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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.s: G = None
        self.y: E = None
        self.q: D = None
        self.x: H = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: F = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: H = None
        self.s: G = None
        self.y: E = None
        self.q: D = None
        self.x: H = None
        self.o: E = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: F = None
        self.v: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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