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

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

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

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

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

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

j.o = d
j.u = d
j.y = n
j.w = g
j.s = g
l.o = g
l.t = g
l.s = i
n.v = g
n.u = g
n.w = j
n.y = d
i.r = n
i.o = n
i.x = g
i.t = j
g.u = l
g.r = d
g.x = n
d.o = g
d.t = g
d.s = i
assert i.t.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: C = None
        self.w: E = None
        self.u: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

j.o = d
j.u = d
j.y = n
j.w = g
j.s = g
l.o = g
l.t = g
l.s = i
n.v = g
n.u = g
n.w = j
n.y = d
i.r = n
i.o = n
i.x = g
i.t = j
g.u = l
g.r = d
g.x = n
d.o = g
d.t = g
d.s = i
assert i.t.u.s.txt == "i"