class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.x: D = None
        self.p: F = None
        self.u: A = None
        self.z: F = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.p: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.v: D = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.q: A = None
        self.w: D = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.z: E = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.p: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: H = None
        self.v: D = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: B = None
        self.q: A = None
        self.w: D = None
        self.v: H = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: A = None
        self.z: E = None
        self.q: G = None
        self.p: B = None
        self.txt = txt

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

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