class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.z: C = None
        self.o: G = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: A = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.u: C = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.r: F = None
        self.p: D = 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.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.q: G = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.s: H = None
        self.p: C = None
        self.u: E = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: A = None
        self.p: G = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.u: C = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.r: F = None
        self.p: D = 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.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: A = None
        self.q: G = None
        self.r: A = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: B = None
        self.s: H = None
        self.p: C = None
        self.u: E = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

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

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