class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.r: D = None
        self.p: A = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.p: G = None
        self.u: F = None
        self.y: B = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.z: A = None
        self.x: C = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.r: D = None
        self.p: A = None
        self.o: A = None
        self.w: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.p: G = None
        self.u: F = None
        self.y: B = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.z: A = None
        self.x: C = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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