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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

h = A("h")
k = B("k")
a = C("a")
b = D("b")
e = E("e")
i = A("i")
j = A("j")
d = E("d")

h.r = a
h.t = i
h.o = i
h.u = e
k.t = h
k.w = e
k.y = e
k.s = e
k.u = a
a.w = e
b.u = j
b.s = d
b.p = e
b.v = k
e.s = a
e.y = k
e.x = k
e.v = i
i.r = a
i.t = j
i.u = d
i.o = h
j.r = a
j.t = i
j.u = e
j.o = h
d.s = a
d.y = k
d.x = k
d.v = j
assert d.v.t.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.v: A = None
        self.x: B = None
        self.txt = txt

h = A("h")
k = B("k")
a = C("a")
b = D("b")
e = E("e")
i = A("i")
j = A("j")
d = E("d")

h.r = a
h.t = i
h.o = i
h.u = e
k.t = h
k.w = e
k.y = e
k.s = e
k.u = a
a.w = e
b.u = j
b.s = d
b.p = e
b.v = k
e.s = a
e.y = k
e.x = k
e.v = i
i.r = a
i.t = j
i.u = d
i.o = h
j.r = a
j.t = i
j.u = e
j.o = h
d.s = a
d.y = k
d.x = k
d.v = j
assert d.v.t.t.o.txt == "h"