The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the «translation». Vasya translated word *s* from Berlandish into Birlandish as *t*. Help him: find out if he translated the word correctly.
The first line contains word *s*, the second line contains word *t*. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.
import math
import pygame
import pygame.freetype
import select
import sys

from graph import *
from hw9 import *
from pygame.locals import *

# Colors
BG_COLOR = (236, 240, 241)
BLACK = (0,0,0)
LINE_COLOR = (25, 181, 254)
POINT_COLOR = (31, 58, 147)
TEXT_COLOR = (31, 58, 147)

# Screen constants
WIDTH = 1100
HEIGHT = 700
MARGIN_TOP = 20
FOOTER_HEIGHT = 50

# Map constants
MINLON = 121.4856
MINLAT = 31.2018
MAXLON = 121.5792
MAXLAT = 31.2536
LONSPAN = MAXLON - MINLON
LATSPAN = MAXLAT - MINLAT

def main():
    # Intitialize Pygame objects
    pygame.init()
    event = pygame.event.poll()
    clock = pygame.time.Clock()

    # Pygame window variables
    pygame.display.set_caption('Interactive Map')
    screen = pygame.display.set_mode([WIDTH, HEIGHT])

    # Game variables 
    map_verticies, map_edges = getMap()
    map_graph = Graph()
    coords_to_vertex = dict()
    # Load verticies in map
    for coords in map_verticies:
        if in_map(coords):
            vertex = map_graph.insert_vertex(scale(coords))
            coords_to_vertex[coords] = vertex
    # Load edges in map
    for endpts in map_edges:
        if in_map(endpts[0]) and in_map(endpts[1]):
            edge = (coords_to_vertex[endpts[0]], coords_to_vertex[endpts[1]])
            if map_graph.get_edge(*edge) is None:
                map_graph.insert_edge(*edge)

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                pygame.quit() 
                sys.exit()

        draw_map(map_graph, screen)

        # End pygame loop things
        pygame.display.flip() # update entire screen 
        screen.fill(BG_COLOR) # erase screen (on next iteration)
        clock.tick(60) # lock to below 60 fps

def in_map(coords):
    '''Returns if the coordinates are in the map.'''
    return (MINLON <= coords[0] <= MAXLON) and (MINLAT <= coords[1] <= MAXLAT)

def draw_map(map_graph, screen):
    '''Draws map_graph on screen.'''
    for edge in map_graph.edges():
        vertex_A, vertex_B = edge.endpoints()
        coords_A, coords_B = vertex_A.element(), vertex_B.element()

        pygame.draw.line(screen, LINE_COLOR, coords_A, coords_B, 1)

def scale(coords_A):
    '''Returns two coordinates scaled to pixels.'''
    scaled_A_x = ((coords_A[0] - MINLON) / LONSPAN)*WIDTH
    scaled_A_y = ((coords_A[1] - MINLAT) / LATSPAN)*HEIGHT

    return (scaled_A_x, scaled_A_y)



if __name__ == '__main__':
    main()
 			 	  	   	 	 	  	    				