class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.w: E = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

l.v = d
l.o = b
l.p = g
l.r = e
f.u = g
f.p = g
f.x = i
f.s = k
d.r = e
d.p = i
d.x = f
d.s = b
e.y = b
e.p = g
e.o = c
b.v = f
b.u = a
b.w = k
b.s = g
b.p = e
c.v = d
c.o = b
c.p = l
c.r = e
g.v = i
g.o = k
g.p = l
g.r = e
a.u = l
a.x = d
a.s = k
a.p = c
i.r = e
i.p = d
i.x = a
i.s = k
k.v = f
k.u = a
k.w = b
k.s = g
k.p = e
assert f.s.w.u.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: E = None
        self.p: A = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.x: C = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.w: E = None
        self.s: A = None
        self.p: D = None
        self.txt = txt

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

l.v = d
l.o = b
l.p = g
l.r = e
f.u = g
f.p = g
f.x = i
f.s = k
d.r = e
d.p = i
d.x = f
d.s = b
e.y = b
e.p = g
e.o = c
b.v = f
b.u = a
b.w = k
b.s = g
b.p = e
c.v = d
c.o = b
c.p = l
c.r = e
g.v = i
g.o = k
g.p = l
g.r = e
a.u = l
a.x = d
a.s = k
a.p = c
i.r = e
i.p = d
i.x = a
i.s = k
k.v = f
k.u = a
k.w = b
k.s = g
k.p = e
assert f.s.w.u.x.p.txt == "i"