class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.s: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.s: G = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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