class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.t: F = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: F = None
        self.x: B = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.p: E = None
        self.s: A = None
        self.z: E = None
        self.t: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: A = None
        self.r: F = None
        self.w: G = None
        self.s: B = None
        self.z: B = None
        self.u: A = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: I = None
        self.y: C = None
        self.t: I = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: D = None
        self.z: C = None
        self.w: C = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: F = None
        self.x: B = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.p: E = None
        self.s: A = None
        self.z: E = None
        self.t: F = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: A = None
        self.r: F = None
        self.w: G = None
        self.s: B = None
        self.z: B = None
        self.u: A = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: I = None
        self.y: C = None
        self.t: I = None
        self.q: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: F = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: D = None
        self.z: C = None
        self.w: C = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

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

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