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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.w: A = None
        self.p: B = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.o: F = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.o: B = None
        self.s: B = None
        self.w: D = None
        self.v: J = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

c = A("c")
m = B("m")
a = C("a")
h = D("h")
f = E("f")
i = F("i")
e = G("e")
k = H("k")
b = I("b")
g = J("g")

c.z = a
c.y = a
c.p = g
c.w = e
c.o = k
c.r = m
c.t = f
c.x = b
c.u = i
m.t = h
m.q = f
a.y = i
a.t = e
a.w = c
a.p = m
a.s = h
a.v = h
h.y = k
h.z = k
h.r = i
h.o = i
h.w = m
f.p = e
f.q = c
f.z = c
f.w = i
f.x = m
i.q = m
e.z = a
e.y = a
e.r = m
e.q = m
e.x = h
e.t = h
e.w = k
e.s = i
e.p = i
k.u = m
k.r = m
b.t = h
b.w = h
b.p = a
b.o = m
b.s = m
b.v = g
b.r = c
g.q = i
g.p = a
g.y = h
assert b.s.t.z.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: J = None
        self.w: G = None
        self.y: C = None
        self.o: H = None
        self.r: B = None
        self.t: E = None
        self.x: I = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: G = None
        self.w: A = None
        self.p: B = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.o: F = None
        self.z: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: C = None
        self.o: B = None
        self.s: B = None
        self.w: D = None
        self.v: J = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: C = None
        self.y: D = None
        self.txt = txt

c = A("c")
m = B("m")
a = C("a")
h = D("h")
f = E("f")
i = F("i")
e = G("e")
k = H("k")
b = I("b")
g = J("g")

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