#!/usr/bin/python3 # Originally by Dave Long, thoroughly screwed up by Kragen Javier Sitaker import sys;sys.stdout.buffer.write(min(output # SAMOGONSHCHIK: maybe it distills stdin, maybe you go blind for pay in [sys.stdin.read().encode('utf-8')] for c0 in [b'%PDF-1.1\n%\xa5\xa5\xa5\xa5\n'] for c1 in [b'1 0 obj\n<>\nendobj\n'] for c2 in [b'2 0 obj\n<>\nendobj\n'] for c3 in [b'3 0 obj\n<> ' b'>> >> >>\nendobj\n'] for c4 in [b'4 0 obj\n<>\nstream\n' % len(pay) + b'%s\nendstream\nendobj\n' % pay] for lengths in [list(map(len, [c0, c1, c2, c3, c4]))] for offsets in [[sum(lengths[:i+1]) for i in range(len(lengths))]] for xrefs in [b'xref\n0 5\n0000000000 65535 f \n' + b''.join(b'%010d 00000 n \n' % n for n in offsets[:-1])] for trailer in [b'trailer\n<>\n' b'startxref\n%d\n%%%%EOF\n' % offsets[-1]] for output in [c0+c1+c2+c3+c4+xrefs+trailer]))