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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.q: H = None
        self.z: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.o: D = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: H = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: G = None
        self.q: H = None
        self.z: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: B = None
        self.o: D = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: H = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

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

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