reads and prints