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

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

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

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

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

h = A("h")
g = B("g")
k = C("k")
i = D("i")
d = E("d")
b = C("b")
e = A("e")
l = A("l")

h.s = e
h.q = e
h.x = k
h.y = k
g.u = i
g.z = k
g.v = b
k.s = b
k.o = g
k.x = h
k.u = i
i.o = d
d.t = i
b.s = k
b.o = g
b.x = l
b.u = i
e.s = l
e.q = l
e.x = k
e.y = b
l.s = e
l.q = e
l.x = b
l.y = b
assert h.s.y.u.o.t.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: C = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

h = A("h")
g = B("g")
k = C("k")
i = D("i")
d = E("d")
b = C("b")
e = A("e")
l = A("l")

h.s = e
h.q = e
h.x = k
h.y = k
g.u = i
g.z = k
g.v = b
k.s = b
k.o = g
k.x = h
k.u = i
i.o = d
d.t = i
b.s = k
b.o = g
b.x = l
b.u = i
e.s = l
e.q = l
e.x = k
e.y = b
l.s = e
l.q = e
l.x = b
l.y = b
assert h.s.y.u.o.t.o.t.o.txt == "d"