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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
i = C("i")
d = D("d")
l = E("l")
j = C("j")
f = A("f")
c = D("c")

g.w = l
g.s = l
g.o = a
g.r = f
a.z = f
a.w = f
a.u = j
i.s = f
i.r = d
i.t = a
d.r = f
d.s = a
d.w = l
d.z = i
l.t = i
l.p = i
l.y = j
j.s = g
j.r = c
j.t = a
f.w = l
f.s = l
f.o = a
f.r = g
c.r = f
c.s = a
c.w = l
c.z = j
assert l.y.t.u.t.z.s.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: B = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.y: C = None
        self.txt = txt

g = A("g")
a = B("a")
i = C("i")
d = D("d")
l = E("l")
j = C("j")
f = A("f")
c = D("c")

g.w = l
g.s = l
g.o = a
g.r = f
a.z = f
a.w = f
a.u = j
i.s = f
i.r = d
i.t = a
d.r = f
d.s = a
d.w = l
d.z = i
l.t = i
l.p = i
l.y = j
j.s = g
j.r = c
j.t = a
f.w = l
f.s = l
f.o = a
f.r = g
c.r = f
c.s = a
c.w = l
c.z = j
assert l.y.t.u.t.z.s.p.t.txt == "a"