class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: E = None
        self.o: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.w: E = None
        self.r: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.z: A = None
        self.x: G = None
        self.s: C = None
        self.u: H = None
        self.q: F = None
        self.w: C = None
        self.r: I = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: I = None
        self.q: I = None
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.s: I = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: J = None
        self.w: E = None
        self.r: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: A = None
        self.z: A = None
        self.x: G = None
        self.s: C = None
        self.u: H = None
        self.q: F = None
        self.w: C = None
        self.r: I = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: I = None
        self.q: I = None
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.s: I = None
        self.x: E = None
        self.t: I = None
        self.txt = txt

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

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