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

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

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

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

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

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

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

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

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

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

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

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

c.w = a
c.v = l
c.y = i
k.v = f
k.t = a
f.p = a
f.r = a
f.w = k
f.o = k
f.q = c
i.r = l
i.p = l
i.v = k
l.q = c
l.w = c
l.o = i
l.v = k
l.y = f
a.p = f
a.r = f
a.w = k
a.o = k
a.q = c
assert k.t.p.o.v.q.v.txt == "l"