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

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

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

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

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

k = A("k")
e = B("e")
a = C("a")
m = D("m")
h = E("h")
i = C("i")
l = B("l")
j = E("j")

k.t = e
k.y = j
k.u = m
k.p = l
e.t = k
e.w = k
a.v = l
m.t = a
h.u = m
h.x = e
i.v = e
l.t = k
l.w = k
j.u = m
j.x = l
assert i.v.w.u.t.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.u: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

k = A("k")
e = B("e")
a = C("a")
m = D("m")
h = E("h")
i = C("i")
l = B("l")
j = E("j")

k.t = e
k.y = j
k.u = m
k.p = l
e.t = k
e.w = k
a.v = l
m.t = a
h.u = m
h.x = e
i.v = e
l.t = k
l.w = k
j.u = m
j.x = l
assert i.v.w.u.t.v.w.txt == "k"