' #wholething
print ''
################################ we're leaving now
if zigorzag == "zag" : sys.exit()
################################ we're leaving now
title=s[0:500]
title=title.strip()+"\n\n\n"
title=title[0:title.find("\n\n\n")]
title=title.strip()
author=s[s.find("\n\n by "):1000]
author=author.strip()+"\n\n"
author=author[3:author.find("\n\n")]
author=author.strip()
chapters=s.split("\n\n\n\n\n")
whatsappropriate=""
whatsappropriate=whatsappropriate+"title="+title+" \n"
whatsappropriate=whatsappropriate+"author="+author+" \n"
whatsappropriate=whatsappropriate+"num of sections="+str(len(chapters))+"\n"
whatsappropriate=whatsappropriate+" "+title+"\n"
for x in range(1,len(linknames)) :
whatsappropriate=whatsappropriate+" "+linknames[x]+"\n"
whatsappropriate=whatsappropriate+"\n"
thenotes=s.split("\n\n[")
if len(thenotes) > 0 :
whatsappropriate=whatsappropriate+"num of footnotes="+str(len(thenotes)-1)+"\n"
for x in range(1,len(thenotes)) :
whatsappropriate=whatsappropriate+" "+thenotes[x]+"\n"
whatsappropriate=whatsappropriate+"\n"
httplinks=[]
thelinks=s.split("http")
for x in range(0,len(thelinks)) :
thelinks[x]=thelinks[x].replace("\n"," ")
thelinks[x]=thelinks[x].replace("\t"," ")
thelinks[x]=thelinks[x]+" "
fws=thelinks[x].find(" ")
thelinks[x]=thelinks[x][0:fws]
thelinks[x]="http"+thelinks[x]
if thelinks[x][-4:] == ".jpg" : thelinks[x]=""
if thelinks[x][-4:] == ".png" : thelinks[x]=""
if thelinks[x][-4:] == ".gif" : thelinks[x]=""
if thelinks[x] != "" : httplinks.append(thelinks[x])
whatsappropriate=whatsappropriate+"num of links="+str(len(httplinks)-1)+"\n"
if len(httplinks) > 0 :
for x in range(1,len(httplinks)) :
whatsappropriate=whatsappropriate+' '+thelinks[x]+'\n'
whatsappropriate=whatsappropriate+"\n"
sg=s
sg=sg.replace(".jpg",".jpggraphicfuzzy")
sg=sg.replace(".png",".pnggraphicfuzzy")
sg=sg.replace(".gif",".gifgraphicfuzzy")
thegraphics=sg.split("graphicfuzzy")
whatsappropriate=whatsappropriate+"num of graphics="+str(len(thegraphics)-1)+"\n"
for x in range(0,len(thegraphics)-1) :
if thegraphics[x] != "" :
thegraphics[x]=thegraphics[x][thegraphics[x].rfind("http"):]
whatsappropriate=whatsappropriate+' '+thegraphics[x]+'\n'
whatsappropriate=whatsappropriate.strip()
print "