Both threads are synchronizing

First is taking input and second put it on stdout