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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

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

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