test using sys.stdin.readline() as input