class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.q: D = None
        self.o: F = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

m = A("m")
b = B("b")
i = C("i")
n = D("n")
a = E("a")
l = F("l")
e = C("e")
j = E("j")
f = F("f")

m.p = b
m.t = i
m.q = n
m.o = f
m.v = f
m.r = a
b.z = f
b.q = f
b.v = l
b.x = m
b.u = m
b.t = i
i.o = f
i.x = f
i.u = e
i.p = n
n.u = j
a.t = e
a.u = e
a.p = j
a.x = i
a.z = n
l.x = m
l.y = m
l.u = n
l.v = n
l.w = n
l.z = a
e.o = f
e.x = f
e.u = i
e.p = n
j.t = i
j.u = i
j.p = a
j.x = e
j.z = n
f.x = m
f.y = m
f.u = n
f.v = n
f.w = n
f.z = j
assert n.u.x.p.u.z.u.z.u.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.q: D = None
        self.o: F = None
        self.r: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

m = A("m")
b = B("b")
i = C("i")
n = D("n")
a = E("a")
l = F("l")
e = C("e")
j = E("j")
f = F("f")

m.p = b
m.t = i
m.q = n
m.o = f
m.v = f
m.r = a
b.z = f
b.q = f
b.v = l
b.x = m
b.u = m
b.t = i
i.o = f
i.x = f
i.u = e
i.p = n
n.u = j
a.t = e
a.u = e
a.p = j
a.x = i
a.z = n
l.x = m
l.y = m
l.u = n
l.v = n
l.w = n
l.z = a
e.o = f
e.x = f
e.u = i
e.p = n
j.t = i
j.u = i
j.p = a
j.x = e
j.z = n
f.x = m
f.y = m
f.u = n
f.v = n
f.w = n
f.z = j
assert n.u.x.p.u.z.u.z.u.txt == "j"