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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.s: H = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

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