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

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

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

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

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

f = A("f")
l = B("l")
i = C("i")
k = D("k")
a = E("a")

f.v = i
f.t = i
f.x = a
f.w = k
l.u = a
l.t = k
l.w = k
l.p = f
l.q = f
i.v = l
i.o = f
k.y = a
k.u = f
a.o = i
a.s = k
a.q = k
a.u = l
a.w = l
assert k.y.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

f = A("f")
l = B("l")
i = C("i")
k = D("k")
a = E("a")

f.v = i
f.t = i
f.x = a
f.w = k
l.u = a
l.t = k
l.w = k
l.p = f
l.q = f
i.v = l
i.o = f
k.y = a
k.u = f
a.o = i
a.s = k
a.q = k
a.u = l
a.w = l
assert k.y.s.u.txt == "f"