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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: G = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: F = None
        self.x: D = None
        self.r: J = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: A = None
        self.y: E = None
        self.q: J = None
        self.v: C = None
        self.p: J = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.s: C = None
        self.q: B = None
        self.u: E = None
        self.r: I = None
        self.v: G = None
        self.o: E = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: G = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.o: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: F = None
        self.x: D = None
        self.r: J = None
        self.p: G = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: A = None
        self.y: E = None
        self.q: J = None
        self.v: C = None
        self.p: J = None
        self.x: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: I = None
        self.s: C = None
        self.q: B = None
        self.u: E = None
        self.r: I = None
        self.v: G = None
        self.o: E = None
        self.y: C = None
        self.x: B = None
        self.txt = txt

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

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