class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: I = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.p: I = None
        self.v: A = None
        self.z: C = None
        self.o: C = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: C = None
        self.u: I = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: D = None
        self.p: I = None
        self.v: A = None
        self.z: C = None
        self.o: C = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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