class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.y: A = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.z: C = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.w: B = None
        self.x: B = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.y: A = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: C = None
        self.z: C = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.w: B = None
        self.x: B = None
        self.u: D = None
        self.txt = txt

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

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