#!/usr/bin/env python

"""
Input: raw text, one document per line, <NEWLINE> represents newline, tab-
separated first line contains ID.

Output: the first few documents, so that there are 4,625,000 bytes.
"""

import sys

count = 0

for line in sys.stdin:
    sys.stdout.write(line)
    docid, text = line.split('\t', 1)
    count += len(text.rstrip())
    if count >= 4625000:
        break
