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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

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

i = A("i")
n = B("n")
l = C("l")
k = D("k")
g = E("g")
c = F("c")
h = G("h")
a = H("a")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.z: D = None
        self.txt = txt

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

i = A("i")
n = B("n")
l = C("l")
k = D("k")
g = E("g")
c = F("c")
h = G("h")
a = H("a")

i.y = c
i.w = n
i.z = l
i.t = l
n.y = l
n.v = g
l.r = g
l.w = g
l.v = g
l.o = n
k.r = a
k.v = n
k.y = n
k.p = i
k.z = i
k.x = g
k.t = l
k.o = l
g.u = h
g.s = a
g.t = k
c.u = h
c.t = h
c.p = i
h.o = l
h.x = l
h.z = k
a.s = k
assert h.x.o.y.o.y.o.y.o.txt == "n"