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

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

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

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

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

m = A("m")
d = B("d")
g = C("g")
n = D("n")
k = E("k")
c = B("c")
e = E("e")
l = C("l")
j = D("j")
i = C("i")

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

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

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

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

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

m = A("m")
d = B("d")
g = C("g")
n = D("n")
k = E("k")
c = B("c")
e = E("e")
l = C("l")
j = D("j")
i = C("i")

m.s = d
m.p = n
m.x = g
m.w = k
m.v = c
d.u = m
d.x = n
g.t = m
g.s = m
g.v = k
g.r = i
g.w = d
n.p = j
n.y = m
n.z = k
k.q = m
k.y = j
k.x = l
k.s = c
c.u = m
c.x = n
e.q = m
e.y = n
e.x = i
e.s = c
l.t = m
l.s = m
l.v = e
l.r = g
l.w = d
j.p = n
j.y = m
j.z = e
i.t = m
i.s = m
i.v = k
i.r = g
i.w = c
assert g.s.p.p.y.v.u.v.x.y.w.txt == "k"