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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: J = None
        self.s: J = None
        self.y: D = None
        self.x: J = None
        self.t: C = None
        self.w: H = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.o: E = None
        self.y: A = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.v: I = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: J = None
        self.s: J = None
        self.y: D = None
        self.x: J = None
        self.t: C = None
        self.w: H = None
        self.u: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: B = None
        self.o: E = None
        self.y: A = None
        self.x: G = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.v: I = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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