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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

l.p = f
l.t = m
l.z = n
l.r = g
k.o = c
k.s = h
n.o = a
i.x = f
i.r = f
i.w = a
i.t = a
a.r = m
a.w = k
a.v = f
m.r = a
m.w = k
m.v = i
c.p = i
c.t = m
c.z = g
c.r = g
h.o = a
f.x = i
f.r = i
f.w = a
f.t = m
g.o = m
assert a.v.x.w.w.s.o.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: E = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

l.p = f
l.t = m
l.z = n
l.r = g
k.o = c
k.s = h
n.o = a
i.x = f
i.r = f
i.w = a
i.t = a
a.r = m
a.w = k
a.v = f
m.r = a
m.w = k
m.v = i
c.p = i
c.t = m
c.z = g
c.r = g
h.o = a
f.x = i
f.r = i
f.w = a
f.t = m
g.o = m
assert a.v.x.w.w.s.o.r.v.txt == "i"