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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

e.t = n
e.p = g
e.r = l
g.z = l
g.y = k
g.w = f
g.t = a
a.r = f
a.z = f
a.w = n
a.q = l
m.x = l
m.s = g
m.w = a
m.r = a
l.s = f
f.z = l
f.y = k
f.w = g
f.t = a
k.t = e
k.p = g
k.r = l
b.x = l
b.s = f
b.w = a
b.r = h
n.t = e
n.p = f
n.r = l
h.r = g
h.w = e
h.z = f
h.q = l
assert n.r.s.w.w.t.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

e.t = n
e.p = g
e.r = l
g.z = l
g.y = k
g.w = f
g.t = a
a.r = f
a.z = f
a.w = n
a.q = l
m.x = l
m.s = g
m.w = a
m.r = a
l.s = f
f.z = l
f.y = k
f.w = g
f.t = a
k.t = e
k.p = g
k.r = l
b.x = l
b.s = f
b.w = a
b.r = h
n.t = e
n.p = f
n.r = l
h.r = g
h.w = e
h.z = f
h.q = l
assert n.r.s.w.w.t.w.r.txt == "l"