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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: D = None
        self.r: J = None
        self.x: G = None
        self.o: F = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.r: H = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.u: J = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.z: G = None
        self.t: G = None
        self.s: I = None
        self.r: D = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: D = None
        self.r: J = None
        self.x: G = None
        self.o: F = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.r: H = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: F = None
        self.u: J = None
        self.p: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.z: G = None
        self.t: G = None
        self.s: I = None
        self.r: D = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

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

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