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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.p: F = None
        self.u: A = None
        self.r: C = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.p: F = None
        self.u: A = None
        self.r: C = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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