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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.s: H = None
        self.z: J = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: J = None
        self.z: H = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.w: B = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.t: F = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.s: H = None
        self.z: J = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: J = None
        self.z: H = None
        self.v: I = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.w: B = None
        self.o: E = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: D = None
        self.t: F = None
        self.p: C = None
        self.r: H = None
        self.txt = txt

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

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

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