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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.w: A = None
        self.p: E = None
        self.txt = txt

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

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

f.u = n
f.o = b
i.x = a
i.t = h
i.q = h
i.y = k
i.z = n
i.u = n
a.y = f
n.w = a
n.o = a
n.u = f
n.s = b
n.x = m
h.x = a
h.o = a
h.w = f
h.p = b
m.y = k
m.q = h
k.x = a
k.t = b
k.y = c
k.q = h
k.z = n
k.u = n
e.y = k
e.q = b
c.x = a
c.t = h
c.q = h
c.y = k
c.z = n
c.u = n
b.x = a
b.o = a
b.w = f
b.p = h
assert b.x.y.o.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.w: A = None
        self.p: E = None
        self.txt = txt

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

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

f.u = n
f.o = b
i.x = a
i.t = h
i.q = h
i.y = k
i.z = n
i.u = n
a.y = f
n.w = a
n.o = a
n.u = f
n.s = b
n.x = m
h.x = a
h.o = a
h.w = f
h.p = b
m.y = k
m.q = h
k.x = a
k.t = b
k.y = c
k.q = h
k.z = n
k.u = n
e.y = k
e.q = b
c.x = a
c.t = h
c.q = h
c.y = k
c.z = n
c.u = n
b.x = a
b.o = a
b.w = f
b.p = h
assert b.x.y.o.w.u.txt == "n"