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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.r: B = None
        self.o: B = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.z: D = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.v: C = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.w: G = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: E = None
        self.r: B = None
        self.o: B = None
        self.z: F = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: D = None
        self.z: D = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: D = None
        self.v: C = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.w: G = None
        self.y: B = None
        self.p: B = None
        self.txt = txt

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

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