from HTMLParser import HTMLParser from urllib import urlopen s = raw_input() class PiParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.pre = False def handle_starttag(self, tag, attrs): if tag == 'pre': self.pre = True def handle_endtag(self, tag): self.pre = False def handle_data(self, data): if self.pre: self.pi = data.replace('\n', '') parser = PiParser() url = urlopen('http://www.eveandersson.com/pi/digits/1000000') html = url.read() parser.feed(html) parser.close() for (a, b) in zip(s, parser.pi): if a != b: print("%s %s" % (a, b)) break