class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: E = None
        self.x: H = None
        self.o: B = None
        self.w: C = None
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: B = None
        self.x: C = None
        self.w: C = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: I = None
        self.q: C = None
        self.x: C = None
        self.v: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.q: D = None
        self.o: I = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.r: G = None
        self.u: I = None
        self.v: D = None
        self.y: F = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: A = None
        self.p: D = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: B = None
        self.x: C = None
        self.w: C = None
        self.y: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: I = None
        self.q: C = None
        self.x: C = None
        self.v: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: D = None
        self.q: D = None
        self.o: I = None
        self.x: E = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.r: G = None
        self.u: I = None
        self.v: D = None
        self.y: F = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: E = None
        self.y: A = None
        self.p: D = None
        self.v: C = None
        self.w: B = None
        self.txt = txt

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

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