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

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

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

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

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

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

b.s = i
b.x = f
b.o = d
c.o = i
c.y = b
c.v = k
c.p = f
d.q = k
d.v = i
d.z = e
d.y = b
d.x = f
i.p = b
i.z = c
e.s = b
e.u = b
e.q = c
h.q = d
h.v = i
h.z = e
h.y = b
h.x = f
f.o = i
f.y = b
f.v = d
f.p = c
a.s = b
a.u = b
a.q = c
n.s = b
n.u = b
n.q = c
k.q = h
k.v = i
k.z = n
k.y = b
k.x = f
assert i.p.o.v.z.v.z.s.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

b.s = i
b.x = f
b.o = d
c.o = i
c.y = b
c.v = k
c.p = f
d.q = k
d.v = i
d.z = e
d.y = b
d.x = f
i.p = b
i.z = c
e.s = b
e.u = b
e.q = c
h.q = d
h.v = i
h.z = e
h.y = b
h.x = f
f.o = i
f.y = b
f.v = d
f.p = c
a.s = b
a.u = b
a.q = c
n.s = b
n.u = b
n.q = c
k.q = h
k.v = i
k.z = n
k.y = b
k.x = f
assert i.p.o.v.z.v.z.s.s.z.txt == "c"