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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: C = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

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

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

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