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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

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

l.w = e
l.y = k
l.o = k
l.u = b
l.t = i
g.v = b
g.t = b
g.o = e
k.o = i
k.u = f
k.p = g
k.q = l
b.z = e
b.r = e
b.o = f
f.t = l
f.u = b
i.v = b
i.t = b
i.o = f
e.t = l
e.u = b
assert b.r.t.u.o.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.u: D = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

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

l.w = e
l.y = k
l.o = k
l.u = b
l.t = i
g.v = b
g.t = b
g.o = e
k.o = i
k.u = f
k.p = g
k.q = l
b.z = e
b.r = e
b.o = f
f.t = l
f.u = b
i.v = b
i.t = b
i.o = f
e.t = l
e.u = b
assert b.r.t.u.o.u.o.txt == "f"