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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.z: E = None
        self.w: I = None
        self.o: B = None
        self.u: I = None
        self.s: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.s: G = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: G = None
        self.z: E = None
        self.w: I = None
        self.o: B = None
        self.u: I = None
        self.s: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.s: G = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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