class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.y: H = None
        self.r: E = None
        self.s: F = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.w: A = None
        self.u: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: H = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: B = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.w: A = None
        self.u: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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