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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.o: A = None
        self.u: A = None
        self.q: B = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: A = None
        self.o: A = None
        self.u: A = None
        self.q: B = None
        self.t: F = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: F = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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