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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: E = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.y: A = None
        self.w: A = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: E = None
        self.s: F = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: A = None
        self.y: A = None
        self.w: A = None
        self.t: E = None
        self.o: E = None
        self.txt = txt

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

h.v = j
h.u = d
g.z = j
g.x = m
g.o = m
g.p = d
g.u = h
i.q = l
i.z = c
i.v = a
i.r = m
i.o = h
j.x = m
j.w = l
j.z = a
j.u = d
j.t = h
j.o = g
d.o = l
d.s = l
d.x = c
d.y = h
l.r = c
l.t = c
l.p = h
l.y = h
l.w = h
l.o = d
m.z = j
m.x = g
m.o = g
m.p = c
m.u = h
c.o = l
c.s = l
c.x = d
c.y = h
a.q = l
a.z = c
a.v = i
a.r = g
a.o = h
assert a.z.x.y.u.x.s.p.v.z.txt == "a"