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

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

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

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

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

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

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

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

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

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

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

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

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