class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: E = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.v: D = None
        self.u: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: C = None
        self.v: D = None
        self.u: B = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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