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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.o: D = None
        self.w: D = None
        self.t: D = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

h = A("h")
d = B("d")
l = C("l")
n = D("n")
i = E("i")
c = F("c")
k = G("k")
e = H("e")
f = G("f")

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.o: D = None
        self.w: D = None
        self.t: D = None
        self.z: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

h = A("h")
d = B("d")
l = C("l")
n = D("n")
i = E("i")
c = F("c")
k = G("k")
e = H("e")
f = G("f")

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