#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    word_count
    ~~~~~~~~~~

    :synopsis: input: word, output: occurence count of the word
"""
import sys


if __name__ == '__main__':
    sys.stderr.write('input any word (Ctrl-D to finish)\n')
    while True:
        word = sys.stdin.readline()
        if word == '':  # EOF
            sys.exit(0)
        word = word.strip()
        sys.stdout.write('%s\n' % (word))
        sys.stdout.flush()
