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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: E = None
        self.p: I = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.v: H = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.o: I = None
        self.y: F = None
        self.t: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.o: F = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: E = None
        self.p: I = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.v: H = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.o: I = None
        self.y: F = None
        self.t: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.o: F = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

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