class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.x: F = None
        self.p: E = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

b = A("b")
m = B("m")
f = C("f")
k = D("k")
d = E("d")
l = F("l")
e = E("e")
a = D("a")
h = F("h")
n = C("n")

b.q = f
b.u = n
m.t = d
m.p = a
f.q = m
f.s = m
f.v = a
f.r = a
f.y = n
f.z = n
k.x = e
k.p = m
d.r = e
d.p = e
d.o = n
d.x = l
d.s = m
l.s = a
l.t = k
l.w = m
e.r = d
e.p = d
e.o = n
e.x = h
e.s = m
a.x = d
a.p = m
h.s = k
h.t = k
h.w = m
n.q = m
n.s = m
n.v = k
n.r = k
n.y = f
n.z = f
assert a.p.p.x.x.s.x.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: C = None
        self.x: F = None
        self.p: E = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

b = A("b")
m = B("m")
f = C("f")
k = D("k")
d = E("d")
l = F("l")
e = E("e")
a = D("a")
h = F("h")
n = C("n")

b.q = f
b.u = n
m.t = d
m.p = a
f.q = m
f.s = m
f.v = a
f.r = a
f.y = n
f.z = n
k.x = e
k.p = m
d.r = e
d.p = e
d.o = n
d.x = l
d.s = m
l.s = a
l.t = k
l.w = m
e.r = d
e.p = d
e.o = n
e.x = h
e.s = m
a.x = d
a.p = m
h.s = k
h.t = k
h.w = m
n.q = m
n.s = m
n.v = k
n.r = k
n.y = f
n.z = f
assert a.p.p.x.x.s.x.o.v.txt == "k"