#!/usr/bin/env python
import sys
import binascii
in_data = False
octets = []
for line in sys.stdin:
    line = line.strip()
    if line.startswith("decrypted app data fragment"):
        in_data = True
        continue
    if not line:
        in_data = False
        print binascii.unhexlify(''.join(octets))
        octets = []
        continue
    if not in_data:
        continue
    if len(line.split('|')) > 1:
        octets += line.split('|')[1].split(' ')
if in_data:
    print binascii.unhexlify(''.join(octets))
