class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.u: H = None
        self.r: A = None
        self.w: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.x: A = None
        self.p: C = None
        self.o: D = None
        self.s: B = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

n = A("n")
i = B("i")
l = C("l")
c = D("c")
k = E("k")
f = F("f")
m = G("m")
j = H("j")
a = A("a")

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: A = None
        self.u: H = None
        self.r: A = None
        self.w: G = None
        self.o: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.x: A = None
        self.p: C = None
        self.o: D = None
        self.s: B = None
        self.z: C = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

n = A("n")
i = B("i")
l = C("l")
c = D("c")
k = E("k")
f = F("f")
m = G("m")
j = H("j")
a = A("a")

n.u = k
n.y = a
i.x = c
i.q = l
l.z = j
l.u = j
l.o = j
l.v = a
l.r = a
l.w = m
c.o = n
c.q = m
k.s = a
k.z = a
f.z = c
m.y = l
m.p = l
m.z = l
m.t = c
m.o = c
m.w = c
m.x = a
m.s = i
j.p = k
j.y = k
j.o = i
j.t = c
a.u = k
a.y = n
assert l.o.t.q.x.y.txt == "n"