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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: G = None
        self.v: C = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: A = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.w: A = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: A = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: G = None
        self.v: C = None
        self.u: H = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: A = None
        self.v: C = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.w: A = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: H = None
        self.txt = txt

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

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