class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.t: D = None
        self.w: A = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: D = None
        self.t: E = None
        self.o: B = None
        self.p: E = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.s: B = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

i = A("i")
g = B("g")
b = C("b")
h = D("h")
d = E("d")
c = F("c")
l = G("l")
j = A("j")
a = C("a")
m = E("m")

i.y = h
i.t = j
g.x = m
b.s = d
b.t = l
b.p = i
b.x = c
h.u = l
h.o = b
h.w = b
d.x = m
d.z = l
d.t = h
d.v = h
d.w = j
d.u = a
c.z = j
c.v = h
c.y = h
c.t = d
c.u = d
c.o = g
c.p = m
l.z = g
l.s = g
l.p = b
l.x = b
l.u = c
j.y = h
j.t = i
a.s = d
a.t = l
a.p = j
a.x = c
m.x = d
m.z = l
m.t = h
m.v = h
m.w = j
m.u = b
assert h.o.p.t.y.u.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: G = None
        self.p: A = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: G = None
        self.t: D = None
        self.w: A = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: D = None
        self.t: E = None
        self.o: B = None
        self.p: E = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: C = None
        self.s: B = None
        self.u: F = None
        self.x: C = None
        self.txt = txt

i = A("i")
g = B("g")
b = C("b")
h = D("h")
d = E("d")
c = F("c")
l = G("l")
j = A("j")
a = C("a")
m = E("m")

i.y = h
i.t = j
g.x = m
b.s = d
b.t = l
b.p = i
b.x = c
h.u = l
h.o = b
h.w = b
d.x = m
d.z = l
d.t = h
d.v = h
d.w = j
d.u = a
c.z = j
c.v = h
c.y = h
c.t = d
c.u = d
c.o = g
c.p = m
l.z = g
l.s = g
l.p = b
l.x = b
l.u = c
j.y = h
j.t = i
a.s = d
a.t = l
a.p = j
a.x = c
m.x = d
m.z = l
m.t = h
m.v = h
m.w = j
m.u = b
assert h.o.p.t.y.u.u.p.txt == "m"