Answer No. Your first thought may be to go for something like this
Which is easier to talk about if we write it this way
This approach does not carry the first getLine's interior object over to the last putStrLn. Moreover it is syntactically incorrect. To make this work f would have to be something like
which of course does not get rid of the x.
This kind of situation is where the do block shines.