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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: H = None
        self.p: G = None
        self.y: B = None
        self.v: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: B = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.o: D = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: D = None
        self.u: E = None
        self.t: I = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: H = None
        self.p: G = None
        self.y: B = None
        self.v: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: B = None
        self.o: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.o: D = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: D = None
        self.u: E = None
        self.t: I = None
        self.x: H = None
        self.txt = txt

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

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

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

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