#!/usr/bin/env python3
from bs4 import BeautifulSoup
import fileinput
from functools import reduce

stdin = reduce(lambda content, line: content + line, fileinput.input(), "")
doc   = BeautifulSoup(stdin, 'html.parser')
title = doc.title
plain = reduce(lambda ttl, txt: ttl + txt, title.strings, "").strip()

title.string = plain

print(doc)
