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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: E = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.p: A = None
        self.w: B = None
        self.t: B = None
        self.y: A = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: I = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.r: A = None
        self.v: F = None
        self.u: A = None
        self.z: F = None
        self.y: G = None
        self.q: E = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

m = A("m")
j = B("j")
b = C("b")
l = D("l")
a = E("a")
i = F("i")
g = G("g")
d = H("d")
f = I("f")
n = A("n")

m.q = n
m.o = n
m.s = i
m.u = i
m.v = g
m.x = l
j.p = g
j.z = m
j.u = i
b.z = j
b.t = i
l.y = f
l.q = a
l.p = m
l.r = i
a.r = j
a.w = j
a.t = j
a.q = l
a.z = l
a.p = m
a.y = n
a.s = b
i.v = j
i.s = m
g.t = i
g.v = f
g.q = a
d.o = l
d.s = j
d.r = m
d.u = m
d.v = i
d.z = i
d.y = g
d.q = a
d.x = f
f.t = d
n.q = m
n.o = m
n.s = i
n.u = i
n.v = g
n.x = l
assert b.t.s.x.q.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.o: A = None
        self.v: G = None
        self.u: F = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: E = None
        self.p: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: D = None
        self.p: A = None
        self.w: B = None
        self.t: B = None
        self.y: A = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: I = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: B = None
        self.r: A = None
        self.v: F = None
        self.u: A = None
        self.z: F = None
        self.y: G = None
        self.q: E = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

m = A("m")
j = B("j")
b = C("b")
l = D("l")
a = E("a")
i = F("i")
g = G("g")
d = H("d")
f = I("f")
n = A("n")

m.q = n
m.o = n
m.s = i
m.u = i
m.v = g
m.x = l
j.p = g
j.z = m
j.u = i
b.z = j
b.t = i
l.y = f
l.q = a
l.p = m
l.r = i
a.r = j
a.w = j
a.t = j
a.q = l
a.z = l
a.p = m
a.y = n
a.s = b
i.v = j
i.s = m
g.t = i
g.v = f
g.q = a
d.o = l
d.s = j
d.r = m
d.u = m
d.v = i
d.z = i
d.y = g
d.q = a
d.x = f
f.t = d
n.q = m
n.o = m
n.s = i
n.u = i
n.v = g
n.x = l
assert b.t.s.x.q.r.u.txt == "i"