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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.r: A = None
        self.x: B = None
        self.q: I = None
        self.p: H = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: I = None
        self.p: F = None
        self.q: J = None
        self.y: I = None
        self.w: E = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: E = None
        self.r: A = None
        self.x: B = None
        self.q: I = None
        self.p: H = None
        self.o: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: I = None
        self.p: F = None
        self.q: J = None
        self.y: I = None
        self.w: E = None
        self.x: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.txt = txt

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

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