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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.t: H = None
        self.v: E = None
        self.x: E = None
        self.u: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.s: A = None
        self.q: B = None
        self.o: F = None
        self.v: H = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: D = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

k.o = c
j.s = k
j.p = d
j.v = d
j.x = d
j.y = d
j.t = l
j.u = l
n.x = m
n.p = m
n.o = m
n.s = k
n.q = j
n.v = l
n.t = i
e.y = c
d.u = e
d.p = l
d.v = m
m.s = c
m.w = j
c.t = e
l.t = n
l.q = n
l.y = e
i.r = k
i.u = k
i.v = e
i.s = j
assert j.t.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.t: H = None
        self.v: E = None
        self.x: E = None
        self.u: H = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.s: A = None
        self.q: B = None
        self.o: F = None
        self.v: H = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: D = None
        self.u: A = None
        self.s: B = None
        self.txt = txt

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

k.o = c
j.s = k
j.p = d
j.v = d
j.x = d
j.y = d
j.t = l
j.u = l
n.x = m
n.p = m
n.o = m
n.s = k
n.q = j
n.v = l
n.t = i
e.y = c
d.u = e
d.p = l
d.v = m
m.s = c
m.w = j
c.t = e
l.t = n
l.q = n
l.y = e
i.r = k
i.u = k
i.v = e
i.s = j
assert j.t.t.p.txt == "m"