class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.y: G = None
        self.w: A = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.y: G = None
        self.w: A = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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