class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.r: D = None
        self.w: E = None
        self.u: F = None
        self.p: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.y: F = None
        self.u: F = None
        self.r: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.p: G = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.r: A = None
        self.q: C = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.y: F = None
        self.u: F = None
        self.r: C = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: A = None
        self.u: A = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: C = None
        self.p: G = None
        self.z: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.r: A = None
        self.q: C = None
        self.v: D = None
        self.s: D = None
        self.txt = txt

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

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