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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

h = A("h")
g = B("g")
n = C("n")
i = D("i")
k = E("k")
d = C("d")
l = C("l")
a = D("a")

h.o = i
h.v = a
g.s = h
g.x = h
g.q = k
g.o = l
n.u = l
n.z = k
n.t = a
n.y = g
n.w = g
i.s = a
i.x = a
i.r = l
k.o = i
d.u = l
d.z = k
d.t = i
d.y = g
d.w = g
l.u = n
l.z = k
l.t = a
l.y = g
l.w = g
a.s = i
a.x = i
a.r = n
assert h.v.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

h = A("h")
g = B("g")
n = C("n")
i = D("i")
k = E("k")
d = C("d")
l = C("l")
a = D("a")

h.o = i
h.v = a
g.s = h
g.x = h
g.q = k
g.o = l
n.u = l
n.z = k
n.t = a
n.y = g
n.w = g
i.s = a
i.x = a
i.r = l
k.o = i
d.u = l
d.z = k
d.t = i
d.y = g
d.w = g
l.u = n
l.z = k
l.t = a
l.y = g
l.w = g
a.s = i
a.x = i
a.r = n
assert h.v.x.r.txt == "l"