class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.v: F = None
        self.u: A = None
        self.s: C = None
        self.p: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: D = None
        self.z: H = None
        self.q: G = None
        self.s: H = None
        self.u: H = None
        self.txt = txt

h = A("h")
n = B("n")
l = C("l")
b = D("b")
m = E("m")
d = F("d")
e = G("e")
a = H("a")
k = H("k")

h.t = n
h.w = e
h.r = e
n.y = h
n.v = e
l.t = m
l.w = h
b.o = l
b.x = l
b.s = l
b.v = d
b.p = d
b.u = h
m.r = n
d.x = l
d.s = l
d.w = h
d.p = b
e.x = n
e.t = b
a.r = b
a.p = b
a.z = k
a.s = k
a.u = k
a.q = e
k.r = b
k.p = b
k.z = a
k.s = a
k.u = a
k.q = e
assert h.t.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: G = None
        self.r: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.v: F = None
        self.u: A = None
        self.s: C = None
        self.p: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: D = None
        self.z: H = None
        self.q: G = None
        self.s: H = None
        self.u: H = None
        self.txt = txt

h = A("h")
n = B("n")
l = C("l")
b = D("b")
m = E("m")
d = F("d")
e = G("e")
a = H("a")
k = H("k")

h.t = n
h.w = e
h.r = e
n.y = h
n.v = e
l.t = m
l.w = h
b.o = l
b.x = l
b.s = l
b.v = d
b.p = d
b.u = h
m.r = n
d.x = l
d.s = l
d.w = h
d.p = b
e.x = n
e.t = b
a.r = b
a.p = b
a.z = k
a.s = k
a.u = k
a.q = e
k.r = b
k.p = b
k.z = a
k.s = a
k.u = a
k.q = e
assert h.t.y.t.txt == "n"