class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.q: A = None
        self.o: B = None
        self.v: D = None
        self.w: D = None
        self.u: I = None
        self.y: B = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.x: I = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.r: B = None
        self.q: A = None
        self.w: C = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: D = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
m = G("m")
j = H("j")
n = I("n")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.q: A = None
        self.o: B = None
        self.v: D = None
        self.w: D = None
        self.u: I = None
        self.y: B = None
        self.t: D = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: G = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.x: I = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: H = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: J = None
        self.r: B = None
        self.q: A = None
        self.w: C = None
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: B = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: D = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
m = G("m")
j = H("j")
n = I("n")
c = J("c")

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