class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.w: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.y: E = None
        self.r: H = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: B = None
        self.y: E = None
        self.r: H = None
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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