class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: J = None
        self.o: D = None
        self.q: G = None
        self.w: I = None
        self.r: I = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: C = None
        self.r: J = None
        self.u: F = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: A = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.v: G = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: J = None
        self.q: F = None
        self.s: B = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: C = None
        self.r: J = None
        self.u: F = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: A = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: E = None
        self.v: G = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: J = None
        self.q: F = None
        self.s: B = None
        self.o: G = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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