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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: F = None
        self.w: H = None
        self.z: I = None
        self.s: F = None
        self.y: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.s: G = None
        self.w: F = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: F = None
        self.w: H = None
        self.z: I = None
        self.s: F = None
        self.y: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: B = None
        self.s: G = None
        self.w: F = None
        self.o: I = None
        self.p: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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