#!/usr/bin/python2

#Importing modules
#-----------------
import os
import sys
import tempfile


pi,po=os.popen2("/usr/bin/gpg --batch --armor --decrypt")

data = sys.stdin.readline()

#Extraction of the headers
#-------------------------
headers=""
while data !='\n':
	headers+=data
	data = sys.stdin.readline()
headers+="\n"

#The rest of the input is the message body
#-------------------------
data = sys.stdin.read()
pi.write(data)
pi.close()
body=po.read()

#Print the decrypted mail to the standard output mail and remove tempfiles
#-------------------------
print headers +  body
