class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.u: I = None
        self.q: D = None
        self.p: G = None
        self.o: E = None
        self.t: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: F = None
        self.s: J = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.r: A = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.r: B = None
        self.s: F = None
        self.q: A = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.z: E = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: C = None
        self.t: J = None
        self.u: A = None
        self.p: J = None
        self.s: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: A = None
        self.v: F = None
        self.s: J = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.r: A = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: J = None
        self.r: B = None
        self.s: F = None
        self.q: A = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.z: E = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: C = None
        self.t: J = None
        self.u: A = None
        self.p: J = None
        self.s: C = None
        self.txt = txt

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

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

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