class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.o: C = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
g = C("g")
l = D("l")
j = E("j")

e.v = i
e.s = i
e.u = g
e.o = g
e.t = g
i.u = l
i.w = l
i.o = e
i.s = j
g.w = e
g.u = e
g.o = l
g.s = l
l.p = g
l.u = e
j.z = i
j.x = i
j.o = e
assert e.s.s.x.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.o: C = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: A = None
        self.txt = txt

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

e = A("e")
i = B("i")
g = C("g")
l = D("l")
j = E("j")

e.v = i
e.s = i
e.u = g
e.o = g
e.t = g
i.u = l
i.w = l
i.o = e
i.s = j
g.w = e
g.u = e
g.o = l
g.s = l
l.p = g
l.u = e
j.z = i
j.x = i
j.o = e
assert e.s.s.x.s.o.txt == "e"