class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: J = None
        self.u: D = None
        self.o: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: C = None
        self.p: J = None
        self.x: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: H = None
        self.o: F = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: C = None
        self.o: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: C = None
        self.p: J = None
        self.x: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: H = None
        self.o: F = None
        self.s: D = None
        self.y: E = None
        self.txt = txt

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

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