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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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