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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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