class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: B = None
        self.p: I = None
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.o: E = None
        self.z: D = None
        self.y: F = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.v: B = 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.w: I = None
        self.t: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.p: G = None
        self.x: G = None
        self.o: C = None
        self.t: G = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: B = None
        self.t: E = None
        self.w: D = None
        self.u: C = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
b = D("b")
n = E("n")
c = F("c")
e = G("e")
l = H("l")
i = I("i")

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.o: E = None
        self.z: D = None
        self.y: F = None
        self.x: A = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: C = None
        self.o: H = None
        self.z: G = None
        self.v: B = 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.w: I = None
        self.t: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.p: G = None
        self.x: G = None
        self.o: C = None
        self.t: G = None
        self.u: A = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: B = None
        self.t: E = None
        self.w: D = None
        self.u: C = None
        self.txt = txt

m = A("m")
j = B("j")
k = C("k")
b = D("b")
n = E("n")
c = F("c")
e = G("e")
l = H("l")
i = I("i")

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