class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.u: E = None
        self.p: A = None
        self.o: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.q: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.r: B = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.t: E = None
        self.o: E = None
        self.w: E = None
        self.p: F = None
        self.u: D = None
        self.v: G = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: H = None
        self.u: E = None
        self.p: A = None
        self.o: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: F = None
        self.q: H = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: F = None
        self.r: B = None
        self.z: I = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.t: E = None
        self.o: E = None
        self.w: E = None
        self.p: F = None
        self.u: D = None
        self.v: G = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.o: E = None
        self.s: C = None
        self.txt = txt

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

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