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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: G = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: I = None
        self.s: F = None
        self.w: B = None
        self.v: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: B = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: G = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: I = None
        self.s: F = None
        self.w: B = None
        self.v: G = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: B = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

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

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

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