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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.u: D = None
        self.z: D = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

i = A("i")
k = B("k")
c = C("c")
a = D("a")
m = E("m")
e = F("e")
g = B("g")
j = F("j")
f = E("f")

i.z = c
k.u = f
k.s = f
k.z = a
c.q = f
c.o = j
c.u = j
c.p = j
c.x = a
a.q = i
m.r = g
m.o = f
m.z = j
e.x = g
e.s = j
e.q = j
e.u = a
e.z = a
e.p = m
g.u = m
g.s = m
g.z = a
j.x = k
j.s = e
j.q = e
j.u = a
j.z = a
j.p = m
f.r = g
f.o = m
f.z = e
assert c.u.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: F = None
        self.u: D = None
        self.z: D = None
        self.q: F = None
        self.p: E = None
        self.txt = txt

i = A("i")
k = B("k")
c = C("c")
a = D("a")
m = E("m")
e = F("e")
g = B("g")
j = F("j")
f = E("f")

i.z = c
k.u = f
k.s = f
k.z = a
c.q = f
c.o = j
c.u = j
c.p = j
c.x = a
a.q = i
m.r = g
m.o = f
m.z = j
e.x = g
e.s = j
e.q = j
e.u = a
e.z = a
e.p = m
g.u = m
g.s = m
g.z = a
j.x = k
j.s = e
j.q = e
j.u = a
j.z = a
j.p = m
f.r = g
f.o = m
f.z = e
assert c.u.x.z.txt == "a"