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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.u: G = None
        self.v: I = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: D = None
        self.v: D = None
        self.u: H = None
        self.x: F = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.u: I = None
        self.p: H = None
        self.t: D = None
        self.w: G = None
        self.v: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.s: D = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.u: G = None
        self.v: I = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: D = None
        self.v: D = None
        self.u: H = None
        self.x: F = None
        self.q: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: A = None
        self.u: I = None
        self.p: H = None
        self.t: D = None
        self.w: G = None
        self.v: D = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.s: D = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

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

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

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

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