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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

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

c = A("c")
l = B("l")
h = C("h")
i = D("i")
j = E("j")
d = A("d")
a = B("a")
e = D("e")

c.v = h
l.o = j
h.t = d
h.p = j
h.r = j
h.o = j
i.q = e
i.w = e
i.v = d
i.u = l
j.o = d
j.w = i
d.v = h
a.o = j
e.q = i
e.w = i
e.v = c
e.u = l
assert d.v.t.v.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

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

c = A("c")
l = B("l")
h = C("h")
i = D("i")
j = E("j")
d = A("d")
a = B("a")
e = D("e")

c.v = h
l.o = j
h.t = d
h.p = j
h.r = j
h.o = j
i.q = e
i.w = e
i.v = d
i.u = l
j.o = d
j.w = i
d.v = h
a.o = j
e.q = i
e.w = i
e.v = c
e.u = l
assert d.v.t.v.t.v.txt == "h"