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

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

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

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

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

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

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

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

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

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

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

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

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