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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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