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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: G = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: G = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

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