There is a very detailed discussion of this problem here. (It is the second of the two problems discussed there. It is not at all easy. Tim Gowers describes it as "a hard problem for those who have done a first course in analysis (one that perhaps one or two people per year are capable of solving) or a hardish exercise in applying the Baire category theorem.")