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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: E = None
        self.w: A = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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