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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.r: A = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.t: G = None
        self.p: A = None
        self.u: D = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: B = None
        self.r: A = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.t: G = None
        self.p: A = None
        self.u: D = None
        self.z: B = None
        self.x: D = None
        self.txt = txt

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

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