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

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

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

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

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

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

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

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

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

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

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

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

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

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

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