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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.p: D = None
        self.y: D = None
        self.z: D = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.y: D = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.z: B = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.y: G = None
        self.s: E = None
        self.z: A = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.p: D = None
        self.y: D = None
        self.z: D = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.y: D = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: E = None
        self.z: B = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.y: G = None
        self.s: E = None
        self.z: A = None
        self.v: B = None
        self.o: G = None
        self.txt = txt

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

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