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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: B = None
        self.v: I = None
        self.w: E = None
        self.y: I = None
        self.u: D = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: F = None
        self.r: A = None
        self.t: J = None
        self.w: A = None
        self.y: A = None
        self.s: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: B = None
        self.v: I = None
        self.w: E = None
        self.y: I = None
        self.u: D = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: F = None
        self.r: A = None
        self.t: J = None
        self.w: A = None
        self.y: A = None
        self.s: J = None
        self.txt = txt

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

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

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