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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.p: C = None
        self.w: E = None
        self.t: A = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

a = A("a")
d = B("d")
j = C("j")
b = D("b")
i = E("i")
c = F("c")
k = G("k")
n = G("n")
l = G("l")
e = G("e")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: C = None
        self.p: C = None
        self.w: E = None
        self.t: A = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

a = A("a")
d = B("d")
j = C("j")
b = D("b")
i = E("i")
c = F("c")
k = G("k")
n = G("n")
l = G("l")
e = G("e")

a.z = n
d.y = c
d.q = j
d.p = j
d.x = j
d.w = i
d.t = a
d.s = a
j.z = i
j.p = c
j.x = c
b.u = l
b.z = i
i.p = j
i.x = a
i.w = n
i.o = d
i.t = d
i.y = c
c.r = n
k.q = l
k.o = j
k.y = n
n.q = e
n.y = e
n.o = j
l.q = k
l.o = j
l.y = n
e.q = l
e.o = j
e.y = k
assert n.q.q.y.q.q.y.o.z.x.z.txt == "n"