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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

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

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

k = A("k")
f = B("f")
l = C("l")
e = D("e")
b = E("b")
g = C("g")
d = D("d")
j = B("j")
i = C("i")

k.y = d
f.q = i
f.w = e
f.u = j
f.s = k
l.r = b
l.q = k
l.x = i
l.s = e
e.r = d
e.t = f
b.x = k
g.r = b
g.q = k
g.x = l
g.s = d
d.r = e
d.t = j
j.q = i
j.w = e
j.u = f
j.s = k
i.r = b
i.q = k
i.x = l
i.s = e
assert k.y.t.s.y.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: A = None
        self.x: C = None
        self.s: D = None
        self.txt = txt

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

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

k = A("k")
f = B("f")
l = C("l")
e = D("e")
b = E("b")
g = C("g")
d = D("d")
j = B("j")
i = C("i")

k.y = d
f.q = i
f.w = e
f.u = j
f.s = k
l.r = b
l.q = k
l.x = i
l.s = e
e.r = d
e.t = f
b.x = k
g.r = b
g.q = k
g.x = l
g.s = d
d.r = e
d.t = j
j.q = i
j.w = e
j.u = f
j.s = k
i.r = b
i.q = k
i.x = l
i.s = e
assert k.y.t.s.y.t.w.txt == "e"