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

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

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

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

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

i = A("i")
a = B("a")
n = C("n")
f = D("f")
j = E("j")
h = D("h")
l = A("l")

i.r = a
i.w = l
i.v = j
a.u = f
n.o = a
f.s = n
f.y = n
f.u = h
f.p = a
f.w = j
j.r = l
j.w = h
h.s = n
h.y = n
h.u = f
h.p = a
h.w = j
l.r = a
l.w = i
l.v = j
assert h.s.o.u.p.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

i = A("i")
a = B("a")
n = C("n")
f = D("f")
j = E("j")
h = D("h")
l = A("l")

i.r = a
i.w = l
i.v = j
a.u = f
n.o = a
f.s = n
f.y = n
f.u = h
f.p = a
f.w = j
j.r = l
j.w = h
h.s = n
h.y = n
h.u = f
h.p = a
h.w = j
l.r = a
l.w = i
l.v = j
assert h.s.o.u.p.u.u.txt == "h"