class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.p: J = None
        self.s: A = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.t: I = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.s: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: D = None
        self.p: J = None
        self.s: A = None
        self.w: B = None
        self.t: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: G = None
        self.t: I = None
        self.z: H = None
        self.txt = txt

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

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