class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: G = None
        self.x: F = None
        self.p: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.z: H = None
        self.x: D = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: I = None
        self.z: C = None
        self.v: A = None
        self.y: I = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.u: I = None
        self.o: C = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: C = None
        self.x: F = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.y: A = None
        self.t: G = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.z: H = None
        self.x: D = None
        self.t: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: I = None
        self.z: C = None
        self.v: A = None
        self.y: I = None
        self.x: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.u: I = None
        self.o: C = None
        self.z: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: C = None
        self.x: F = None
        self.q: C = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: C = None
        self.y: A = None
        self.t: G = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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