class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: C = None
        self.p: H = None
        self.x: H = None
        self.o: I = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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