working first example of multi-threaded application taking input from a user and printing it