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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.s: F = None
        self.y: C = None
        self.x: A = None
        self.w: C = None
        self.u: I = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.v: F = None
        self.z: F = None
        self.r: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.t: B = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

l = A("l")
k = B("k")
a = C("a")
m = D("m")
h = E("h")
b = F("b")
j = G("j")
g = H("g")
n = I("n")

l.v = h
l.y = k
l.x = j
k.z = h
k.t = g
k.s = b
k.r = b
k.y = a
k.w = a
k.x = l
k.u = n
a.q = g
a.o = j
m.x = k
m.z = k
h.p = m
h.r = m
h.o = a
h.v = b
h.z = b
h.q = j
h.x = k
b.t = g
b.z = j
b.w = n
j.v = l
g.w = h
g.o = m
g.t = k
g.x = k
g.y = n
n.t = h
n.v = b
n.q = b
assert n.v.t.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: H = None
        self.s: F = None
        self.y: C = None
        self.x: A = None
        self.w: C = None
        self.u: I = None
        self.r: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.v: F = None
        self.z: F = None
        self.r: D = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.t: B = None
        self.y: I = None
        self.x: B = None
        self.txt = txt

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

l = A("l")
k = B("k")
a = C("a")
m = D("m")
h = E("h")
b = F("b")
j = G("j")
g = H("g")
n = I("n")

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