class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: D = None
        self.y: H = None
        self.x: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.x: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.x: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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