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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.r: E = None
        self.t: E = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.z: E = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: C = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: B = None
        self.r: E = None
        self.t: E = None
        self.v: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.z: E = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.r: C = None
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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