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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.s: B = None
        self.x: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.s: B = None
        self.x: C = None
        self.t: D = None
        self.txt = txt

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

e.t = b
e.q = b
e.r = k
i.y = d
i.w = a
i.x = m
i.p = k
i.s = k
m.x = k
m.z = e
m.v = i
g.u = h
g.p = h
g.s = m
l.z = m
l.x = m
l.u = g
l.s = i
l.t = b
d.t = b
d.r = k
d.q = g
a.z = m
a.x = m
a.u = g
a.s = i
a.t = b
k.y = d
k.w = l
k.x = m
k.p = i
k.s = i
h.t = b
h.r = i
h.q = g
b.u = e
b.s = m
b.p = h
assert m.v.w.t.p.q.p.r.s.txt == "k"