class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.r: E = None
        self.x: D = None
        self.p: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

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

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

g.o = k
g.q = k
g.z = k
g.r = e
g.x = m
g.p = m
k.v = m
k.t = m
h.s = d
m.o = e
m.s = j
m.y = h
e.t = k
e.z = m
e.o = h
j.z = k
j.q = m
j.u = m
j.x = g
j.w = g
j.v = d
a.s = j
f.t = k
f.z = m
f.o = h
d.z = k
d.q = m
d.u = m
d.x = g
d.w = g
d.v = j
c.t = k
c.z = m
c.o = h
assert c.o.s.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: B = None
        self.r: E = None
        self.x: D = None
        self.p: D = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.y: C = None
        self.txt = txt

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

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

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

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