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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.y: E = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: B = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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