class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: J = None
        self.p: D = None
        self.z: E = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.p: I = None
        self.s: G = None
        self.w: D = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: H = None
        self.p: A = None
        self.v: B = None
        self.u: C = None
        self.x: B = None
        self.s: D = None
        self.t: C = None
        self.q: I = None
        self.r: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.z: D = None
        self.x: B = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: J = None
        self.p: D = None
        self.z: E = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.p: I = None
        self.s: G = None
        self.w: D = None
        self.x: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: H = None
        self.p: A = None
        self.v: B = None
        self.u: C = None
        self.x: B = None
        self.s: D = None
        self.t: C = None
        self.q: I = None
        self.r: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: G = None
        self.z: D = None
        self.x: B = None
        self.r: I = None
        self.txt = txt

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

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