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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: I = None
        self.y: J = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: D = None
        self.u: J = None
        self.z: J = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: I = None
        self.s: I = None
        self.q: E = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.x: J = None
        self.y: F = None
        self.p: G = None
        self.w: B = None
        self.v: G = None
        self.s: F = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: I = None
        self.y: J = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.w: D = None
        self.u: J = None
        self.z: J = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: I = None
        self.s: I = None
        self.q: E = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: A = None
        self.x: J = None
        self.y: F = None
        self.p: G = None
        self.w: B = None
        self.v: G = None
        self.s: F = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

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