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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.p: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.x: B = None
        self.t: A = None
        self.o: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

e = A("e")
l = B("l")
a = C("a")
k = D("k")
d = E("d")
g = F("g")
n = G("n")
f = F("f")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.p: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.x: B = None
        self.t: A = None
        self.o: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

e = A("e")
l = B("l")
a = C("a")
k = D("k")
d = E("d")
g = F("g")
n = G("n")
f = F("f")
c = C("c")

e.q = f
e.t = k
e.r = k
e.u = k
e.z = l
e.s = a
l.w = k
l.s = k
l.p = e
l.u = d
a.w = n
a.v = d
k.y = n
k.o = a
d.z = n
g.u = d
g.q = d
g.w = n
g.p = n
g.r = e
g.o = k
n.s = l
n.z = l
n.x = l
n.t = e
n.o = e
n.u = c
n.r = c
f.u = d
f.q = d
f.w = n
f.p = n
f.r = e
f.o = k
c.w = n
c.v = d
assert a.w.s.u.z.txt == "n"