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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.r: D = None
        self.s: B = None
        self.txt = txt

h = A("h")
f = B("f")
m = C("m")
b = D("b")
n = E("n")
a = E("a")
i = C("i")
g = B("g")
c = A("c")
j = E("j")

h.s = j
h.v = b
h.x = b
h.q = g
h.y = f
f.x = a
f.o = b
f.y = h
f.t = h
m.z = c
m.t = g
b.s = c
b.q = n
b.o = f
n.o = f
n.t = m
n.r = b
n.s = g
a.o = f
a.t = m
a.r = b
a.s = g
i.z = c
i.t = g
g.x = j
g.o = b
g.y = h
g.t = c
c.s = j
c.v = b
c.x = b
c.q = f
c.y = f
j.o = g
j.s = g
j.t = m
j.r = b
assert m.z.v.o.o.o.t.s.r.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.q: B = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: D = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.r: D = None
        self.s: B = None
        self.txt = txt

h = A("h")
f = B("f")
m = C("m")
b = D("b")
n = E("n")
a = E("a")
i = C("i")
g = B("g")
c = A("c")
j = E("j")

h.s = j
h.v = b
h.x = b
h.q = g
h.y = f
f.x = a
f.o = b
f.y = h
f.t = h
m.z = c
m.t = g
b.s = c
b.q = n
b.o = f
n.o = f
n.t = m
n.r = b
n.s = g
a.o = f
a.t = m
a.r = b
a.s = g
i.z = c
i.t = g
g.x = j
g.o = b
g.y = h
g.t = c
c.s = j
c.v = b
c.x = b
c.q = f
c.y = f
j.o = g
j.s = g
j.t = m
j.r = b
assert m.z.v.o.o.o.t.s.r.txt == "b"