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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.txt = txt

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

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