class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.w: G = None
        self.v: H = None
        self.u: E = None
        self.x: I = None
        self.p: E = None
        self.q: C = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.w: D = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.w: F = None
        self.r: D = None
        self.x: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.p: H = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.r: G = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.q: A = None
        self.w: B = None
        self.p: H = None
        self.u: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.w: D = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: B = None
        self.w: F = None
        self.r: D = None
        self.x: E = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: H = None
        self.p: H = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.r: G = None
        self.p: I = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.q: A = None
        self.w: B = None
        self.p: H = None
        self.u: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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