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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.o: C = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

l.y = h
l.u = h
l.x = h
l.r = d
a.u = g
a.w = d
a.o = n
a.y = n
a.x = n
n.x = d
n.z = a
n.t = a
g.r = h
g.q = f
g.z = f
g.v = n
g.t = n
d.x = h
d.w = a
d.s = n
d.v = g
d.y = g
f.u = g
f.w = d
f.o = n
f.y = n
f.x = n
h.y = j
h.u = j
h.x = j
h.r = d
j.y = h
j.u = h
j.x = h
j.r = d
assert h.r.s.x.v.z.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: A = None
        self.x: A = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: E = None
        self.o: C = None
        self.y: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

l.y = h
l.u = h
l.x = h
l.r = d
a.u = g
a.w = d
a.o = n
a.y = n
a.x = n
n.x = d
n.z = a
n.t = a
g.r = h
g.q = f
g.z = f
g.v = n
g.t = n
d.x = h
d.w = a
d.s = n
d.v = g
d.y = g
f.u = g
f.w = d
f.o = n
f.y = n
f.x = n
h.y = j
h.u = j
h.x = j
h.r = d
j.y = h
j.u = h
j.x = h
j.r = d
assert h.r.s.x.v.z.w.w.txt == "a"