class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: J = None
        self.o: E = None
        self.z: G = None
        self.q: G = None
        self.w: G = None
        self.r: H = None
        self.s: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: G = None
        self.z: I = None
        self.w: E = None
        self.q: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: G = None
        self.z: I = None
        self.w: E = None
        self.q: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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