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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.r: E = None
        self.y: G = None
        self.q: I = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.r: E = None
        self.y: G = None
        self.q: I = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

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

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