class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: E = None
        self.x: B = None
        self.o: I = None
        self.t: H = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: B = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: D = None
        self.v: C = None
        self.o: D = None
        self.r: F = None
        self.w: I = None
        self.p: C = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: B = None
        self.u: H = None
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: D = None
        self.v: C = None
        self.o: D = None
        self.r: F = None
        self.w: I = None
        self.p: C = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: E = None
        self.s: E = None
        self.r: A = None
        self.txt = txt

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

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