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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: B = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
c = C("c")
d = D("d")
j = E("j")
f = F("f")
l = A("l")
k = B("k")
n = E("n")
m = B("m")

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: B = None
        self.txt = txt

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

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

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

e = A("e")
i = B("i")
c = C("c")
d = D("d")
j = E("j")
f = F("f")
l = A("l")
k = B("k")
n = E("n")
m = B("m")

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