program for reading a string from stdin