class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

e.w = d
d.y = k
d.q = j
d.o = g
k.p = a
k.u = d
g.x = d
g.w = j
j.q = d
j.x = g
j.o = g
j.s = a
a.p = k
a.u = d
i.y = a
i.q = j
i.o = g
assert e.w.o.x.y.u.q.s.txt == "a"