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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.z: A = None
        self.x: D = None
        self.y: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.z: A = None
        self.x: D = None
        self.y: C = None
        self.u: D = None
        self.txt = txt

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

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

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