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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

j = A("j")
h = B("h")
b = C("b")
i = D("i")
f = E("f")
g = C("g")
d = B("d")
l = B("l")

j.o = f
h.p = b
h.r = b
h.w = j
h.u = l
b.p = j
b.q = h
b.o = f
b.t = f
b.y = f
i.v = f
i.t = j
i.w = j
i.q = l
f.u = i
g.p = j
g.q = l
g.o = f
g.t = f
g.y = f
d.p = b
d.r = b
d.w = j
d.u = l
l.p = g
l.r = g
l.w = j
l.u = d
assert i.w.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

j = A("j")
h = B("h")
b = C("b")
i = D("i")
f = E("f")
g = C("g")
d = B("d")
l = B("l")

j.o = f
h.p = b
h.r = b
h.w = j
h.u = l
b.p = j
b.q = h
b.o = f
b.t = f
b.y = f
i.v = f
i.t = j
i.w = j
i.q = l
f.u = i
g.p = j
g.q = l
g.o = f
g.t = f
g.y = f
d.p = b
d.r = b
d.w = j
d.u = l
l.p = g
l.r = g
l.w = j
l.u = d
assert i.w.o.u.txt == "i"