import turtle

def one (b):
    turtle.penup()
    turtle.right(90)
    turtle.forward(30)
    turtle.pendown()
    turtle.left(135)
    turtle.forward(42)
    turtle.right(135)
    turtle.forward(60)
    turtle.penup()
    turtle.left(90)
    turtle.forward(10)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def two (b):
    turtle.forward(30)
    turtle.right(90)
    turtle.forward(30)
    turtle.right(45)
    turtle.forward(42)
    turtle.left(135)
    turtle.forward(30)
    turtle.penup()
    turtle.forward(10)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def three (b):
    for i in range (2):
        turtle.forward(30)
        turtle.right(135)
        turtle.forward(42)
        turtle.left(135)
    turtle.penup()
    turtle.forward(40)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def four (b):
    turtle.right(90)
    turtle.forward(30)
    turtle.left(90)
    turtle.forward(30)
    turtle.right(90)
    turtle.forward(30)
    turtle.left(180)
    turtle.forward(60)
    turtle.penup()
    turtle.right(90)
    turtle.forward(10)
    turtle.pendown()
def five (b):
    turtle.forward(30)
    turtle.left(180)
    turtle.forward(30)
    turtle.left(90)
    turtle.forward(30)
    turtle.left(90)
    turtle.forward(30)
    turtle.right(90)
    turtle.forward(30)
    turtle.right(90)
    turtle.forward(30)
    turtle.left(180)
    turtle.penup()
    turtle.forward(40)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def six (b):
    turtle.penup()
    turtle.forward(30)
    turtle.pendown()
    turtle.right(135)
    turtle.forward(42)
    turtle.left(45)
    turtle.forward(30)
    for i in range (3):
        turtle.left(90)
        turtle.forward(30)
    turtle.left(180)
    turtle.penup()
    turtle.forward(40)
    turtle.left(90)
    turtle.forward(30)
    turtle.right(90)
    turtle.pendown()
def seven (b):
    turtle.forward(30)
    turtle.right(135)
    turtle.forward(42)
    turtle.left(45)
    turtle.forward(30)
    turtle.penup()
    turtle.left(90)
    turtle.forward(40)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def eight (b):
    turtle.right(90)
    turtle.forward(60)
    turtle.left(90)
    turtle.forward(30)
    turtle.left(90)
    turtle.forward(60)
    for i in range (3):
        turtle.left(90)
        turtle.forward(30)
    turtle.penup()
    turtle.forward(10)
    turtle.left(90)
    turtle.forward(30)
    turtle.right(90)
    turtle.pendown()
def nine (b):
    for i in range (6):
        turtle.forward(30)
        turtle.right(90)
    turtle.left(45)
    turtle.forward(42)
    turtle.left(135)
    turtle.penup()
    turtle.forward(40)
    turtle.left(90)
    turtle.forward(60)
    turtle.right(90)
    turtle.pendown()
def zero (b):
    turtle.right(90)
    turtle.forward(60)
    turtle.left(90)
    turtle.forward(30)
    turtle.left(90)
    turtle.forward(60)
    turtle.left(90)
    turtle.forward(30)
    turtle.left(180)
    turtle.penup()
    turtle.forward(40)
    turtle.pendown()
A = [0] * 6
for i in range(6):
    A[i] = int(input())
turtle.shape('turtle')
for i in range(6):
    if A[i]==1:
        one (1)
    elif A[i]==2:
        two (1)
    elif A[i]==3:
        three (1)
    elif A[i]==4:
        four (1)
    elif A[i]==5:
        five (1)
    elif A[i]==6:
        six (1)
    elif A[i]==7:
        seven (1)
    elif A[i]==8:
        eight (1)
    elif A[i]==9:
        nine (1)
    else:
        zero (1)
