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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: B = None
        self.r: E = None
        self.z: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: G = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

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