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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.w: E = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.p: E = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.w: E = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.p: E = None
        self.o: C = None
        self.z: D = None
        self.txt = txt

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

d.o = g
d.z = b
d.y = i
d.t = f
m.w = b
m.r = n
m.s = n
m.o = a
b.s = d
b.z = d
b.w = g
b.v = i
b.t = k
a.s = d
a.r = i
g.s = a
g.z = a
g.y = i
g.p = f
g.o = b
n.w = b
n.r = m
n.s = m
n.o = i
k.s = i
k.y = i
k.z = i
k.p = f
k.o = b
f.s = i
f.z = i
f.y = a
f.p = g
f.o = b
i.s = d
i.r = a
assert a.s.z.w.y.r.r.s.y.r.txt == "a"