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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.r: C = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.r: C = None
        self.t: E = None
        self.y: A = None
        self.txt = txt

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

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