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

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

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

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

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

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

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

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

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

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

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

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

m.x = j
m.t = c
m.y = e
m.v = h
m.p = l
h.w = j
c.x = h
d.y = n
d.q = l
a.q = h
a.p = c
j.x = g
j.t = c
j.y = e
j.v = h
j.p = d
g.x = m
g.t = c
g.y = e
g.v = h
g.p = d
l.y = n
l.q = d
n.x = h
e.q = h
e.p = n
assert j.y.q.w.x.y.txt == "e"