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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: I = None
        self.s: H = None
        self.u: F = None
        self.o: C = None
        self.x: A = None
        self.z: D = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: I = None
        self.t: A = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.o: A = None
        self.p: C = None
        self.t: A = None
        self.w: B = None
        self.q: B = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.r: C = None
        self.w: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: H = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: I = None
        self.s: H = None
        self.u: F = None
        self.o: C = None
        self.x: A = None
        self.z: D = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: I = None
        self.t: A = None
        self.z: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: I = None
        self.o: A = None
        self.p: C = None
        self.t: A = None
        self.w: B = None
        self.q: B = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.r: C = None
        self.w: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: H = None
        self.t: B = None
        self.x: D = None
        self.txt = txt

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

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