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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.u: E = None
        self.w: E = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: E = None
        self.u: E = None
        self.w: E = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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