class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: B = None
        self.u: E = None
        self.v: H = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: I = None
        self.w: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: I = None
        self.q: C = None
        self.r: F = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.q: G = None
        self.s: A = None
        self.v: J = None
        self.t: J = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: I = None
        self.w: G = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: I = None
        self.q: C = None
        self.r: F = None
        self.v: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: A = None
        self.q: G = None
        self.s: A = None
        self.v: J = None
        self.t: J = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: H = None
        self.t: G = None
        self.y: A = None
        self.txt = txt

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

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