class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: F = None
        self.y: B = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: F = None
        self.r: I = None
        self.o: A = None
        self.v: I = None
        self.x: G = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: E = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.s: F = None
        self.r: I = None
        self.o: A = None
        self.v: I = None
        self.x: G = None
        self.q: F = None
        self.u: A = None
        self.txt = txt

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

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

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