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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: A = None
        self.y: C = None
        self.q: J = None
        self.p: H = None
        self.z: J = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: J = None
        self.x: C = None
        self.z: A = None
        self.p: C = None
        self.w: E = None
        self.r: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.z: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: A = None
        self.y: C = None
        self.q: J = None
        self.p: H = None
        self.z: J = None
        self.w: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: J = None
        self.x: C = None
        self.z: A = None
        self.p: C = None
        self.w: E = None
        self.r: E = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.z: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.txt = txt

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

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