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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

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

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

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

j.z = m
h.p = j
h.q = j
h.v = j
a.r = l
a.t = h
a.z = m
a.q = m
a.s = f
g.u = f
g.v = h
g.x = m
g.o = m
l.u = h
l.t = j
l.s = g
c.p = j
c.u = j
c.s = m
c.y = a
c.t = a
c.x = b
f.p = j
f.q = j
f.v = j
b.p = j
b.u = j
b.s = m
b.y = a
b.t = a
b.x = c
m.u = f
m.v = h
m.x = g
m.o = g
assert b.u.z.v.v.z.v.txt == "h"