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

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

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

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

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

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

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

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

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

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

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

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

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