class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: F = None
        self.s: I = None
        self.u: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.s: A = None
        self.p: F = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.s: A = None
        self.p: F = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

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

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