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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.p: I = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: I = None
        self.r: G = None
        self.y: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: B = None
        self.p: I = None
        self.t: H = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: I = None
        self.r: G = None
        self.y: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

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

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