/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
//#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

template <class T = int> inline T readInt();
inline double readDouble();
inline int readUInt();
inline int readChar(); // first non-blank character
inline void readWord( char *s );
inline bool readLine( char *s ); // do not save '\n'
inline bool isEof();
inline int getChar();
inline int peekChar();
inline bool seekEof();
inline void skipBlanks();

template <class T> inline void writeInt( T x, char end = 0, int len = -1 );
inline void writeChar( int x );
inline void writeWord( const char *s );
inline void writeDouble( double x, int len = 0 );
inline void flush();

static struct buffer_flusher_t {
    ~buffer_flusher_t() {
        flush();
    }
} buffer_flusher;

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
    if (buf_pos == buf_len) {
        buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
        if (buf_pos == buf_len)
            return 1;
    }
    return 0;
}

inline int getChar() {
    return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
    return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
    int c;
    while ((c = peekChar()) != -1 && c <= 32)
        buf_pos++;
    return c == -1;
}

inline void skipBlanks() {
    while (!isEof() && buf[buf_pos] <= 32U)
        buf_pos++;
}

inline int readChar() {
    int c = getChar();
    while (c != -1 && c <= 32)
        c = getChar();
    return c;
}

inline int readUInt() {
    int c = readChar(), x = 0;
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return x;
}

template <class T>
inline T readInt() {
    int s = 1, c = readChar();
    T x = 0;
    if (c == '-')
        s = -1, c = getChar();
    else if (c == '+')
        c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return s == 1 ? x : -x;
}

inline double readDouble() {
    int s = 1, c = readChar();
    double x = 0;
    if (c == '-')
        s = -1, c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    if (c == '.') {
        c = getChar();
        double coef = 1;
        while ('0' <= c && c <= '9')
            x += (c - '0') * (coef *= 1e-1), c = getChar();
    }
    return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
    int c = readChar();
    while (c > 32)
        *s++ = c, c = getChar();
    *s = 0;
}

inline bool readLine( char *s ) {
    int c = getChar();
    while (c != '\n' && c != -1)
        *s++ = c, c = getChar();
    *s = 0;
    return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
    if (write_buf_pos == buf_size)
        fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
    write_buf[write_buf_pos++] = x;
}

inline void flush() {
    if (write_buf_pos)
        fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
}

template <class T>
inline void writeInt( T x, char end, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;

    char s[24];
    int n = 0;
    while (x || !n)
        s[n++] = '0' + x % 10, x /= 10;
    while (n < output_len)
        s[n++] = '0';
    while (n--)
        writeChar(s[n]);
    if (end)
        writeChar(end);
}

inline void writeWord( const char *s ) {
    while (*s)
        writeChar(*s++);
}

inline void writeDouble( double x, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;
    int t = (int)x;
    writeInt(t), x -= t;
    writeChar('.');
    for (int i = output_len - 1; i > 0; i--) {
        x *= 10;
        t = std::min(9, (int)x);
        writeChar('0' + t), x -= t;
    }
    x *= 10;
    t = std::min(9, (int)(x + 0.5));
    writeChar('0' + t);
}

matrix g;
bool used[200001];
int cnt[200001];
int c[200001];
vi nms;
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

void dfs2(int u) {
    cnt[c[u]] = 0;
    for(auto v : g[u]) {
        if(cnt[c[v]] != 0)  {
            dfs2(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    n = readInt();
    m = readInt();
    k = readInt();
//    cerr << m;
//    cnt.resize(k + 1);
//    readChar();
    g.resize(n);
//    used.resize(n);
//    c.resize(n);

    for(int i = 0; i < n; i++) {
        c[i] = readInt();
//        cerr << c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        u = readInt();
//        readChar();
        v = readInt();
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            sum = 0;
            mx = -INF;
            dfs(i);
            dfs2(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

matrix g;
vb used;
vi cnt, c;
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    cin >> n >> m >> k;
    cnt.resize(k + 1);
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        cin >> c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            cnt.assign(k + 1, 0);
            sum = 0;
            mx = -INF;
            dfs(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

matrix g;
vb used;
vi cnt, c;
int mx, mxx = -INF, ans = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

void dfs2(int u) {
    used[u] = 1;
    if(c[u] != mx) {
        ans++;
    }
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs2(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    cin >> n >> m >> k;
    cnt.resize(k + 1);
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        cin >> c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            cnt.assign(k + 1, 0);
            dfs(i);
            ans += accumulate(all(cnt), 0) - *max_element(all(cnt));
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
//#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

template <class T = int> inline T readInt();
inline double readDouble();
inline int readUInt();
inline int readChar(); // first non-blank character
inline void readWord( char *s );
inline bool readLine( char *s ); // do not save '\n'
inline bool isEof();
inline int getChar();
inline int peekChar();
inline bool seekEof();
inline void skipBlanks();

template <class T> inline void writeInt( T x, char end = 0, int len = -1 );
inline void writeChar( int x );
inline void writeWord( const char *s );
inline void writeDouble( double x, int len = 0 );
inline void flush();

static struct buffer_flusher_t {
    ~buffer_flusher_t() {
        flush();
    }
} buffer_flusher;

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
    if (buf_pos == buf_len) {
        buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
        if (buf_pos == buf_len)
            return 1;
    }
    return 0;
}

inline int getChar() {
    return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
    return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
    int c;
    while ((c = peekChar()) != -1 && c <= 32)
        buf_pos++;
    return c == -1;
}

inline void skipBlanks() {
    while (!isEof() && buf[buf_pos] <= 32U)
        buf_pos++;
}

inline int readChar() {
    int c = getChar();
    while (c != -1 && c <= 32)
        c = getChar();
    return c;
}

inline int readUInt() {
    int c = readChar(), x = 0;
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return x;
}

template <class T>
inline T readInt() {
    int s = 1, c = readChar();
    T x = 0;
    if (c == '-')
        s = -1, c = getChar();
    else if (c == '+')
        c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return s == 1 ? x : -x;
}

inline double readDouble() {
    int s = 1, c = readChar();
    double x = 0;
    if (c == '-')
        s = -1, c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    if (c == '.') {
        c = getChar();
        double coef = 1;
        while ('0' <= c && c <= '9')
            x += (c - '0') * (coef *= 1e-1), c = getChar();
    }
    return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
    int c = readChar();
    while (c > 32)
        *s++ = c, c = getChar();
    *s = 0;
}

inline bool readLine( char *s ) {
    int c = getChar();
    while (c != '\n' && c != -1)
        *s++ = c, c = getChar();
    *s = 0;
    return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
    if (write_buf_pos == buf_size)
        fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
    write_buf[write_buf_pos++] = x;
}

inline void flush() {
    if (write_buf_pos)
        fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
}

template <class T>
inline void writeInt( T x, char end, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;

    char s[24];
    int n = 0;
    while (x || !n)
        s[n++] = '0' + x % 10, x /= 10;
    while (n < output_len)
        s[n++] = '0';
    while (n--)
        writeChar(s[n]);
    if (end)
        writeChar(end);
}

inline void writeWord( const char *s ) {
    while (*s)
        writeChar(*s++);
}

inline void writeDouble( double x, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;
    int t = (int)x;
    writeInt(t), x -= t;
    writeChar('.');
    for (int i = output_len - 1; i > 0; i--) {
        x *= 10;
        t = std::min(9, (int)x);
        writeChar('0' + t), x -= t;
    }
    x *= 10;
    t = std::min(9, (int)(x + 0.5));
    writeChar('0' + t);
}

matrix g;
bool used[200001];
int cnt[200001];
int c[200001];
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    n = readInt();
    m = readInt();
    k = readInt();
//    cerr << m;
//    cnt.resize(k + 1);
//    readChar();
    g.resize(n);
//    used.resize(n);
//    c.resize(n);
    for(int i = 0; i < n; i++) {
        c[i] = readInt();
//        cerr << c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        u = readInt();
//        readChar();
        v = readInt();
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            zero(cnt);
            sum = 0;
            mx = -INF;
            dfs(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

matrix g;
vb used;
vi c;
int cnt[200001];
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    cin >> n >> m >> k;
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        cin >> c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            zero(cnt);
            sum = 0;
            mx = -INF;
            dfs(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

matrix g;
vb used;
vi cnt, c;
int mx, mxx = -INF, ans = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

void dfs2(int u) {
    used[u] = 1;
    if(c[u] != mx) {
        ans++;
    }
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs2(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    cin >> n >> m >> k;
    cnt.resize(k + 1);
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        cin >> c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    dfs(st);
    for(int i = 0; i <= k; i++) {
        if(cnt[i] >= mxx) {
            mxx = cnt[i];
            mx = i;
        }
    }
    used.assign(n, 0);
    dfs2(st);
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
//#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

template <class T = int> inline T readInt();
inline double readDouble();
inline int readUInt();
inline int readChar(); // first non-blank character
inline void readWord( char *s );
inline bool readLine( char *s ); // do not save '\n'
inline bool isEof();
inline int getChar();
inline int peekChar();
inline bool seekEof();
inline void skipBlanks();

template <class T> inline void writeInt( T x, char end = 0, int len = -1 );
inline void writeChar( int x );
inline void writeWord( const char *s );
inline void writeDouble( double x, int len = 0 );
inline void flush();

static struct buffer_flusher_t {
    ~buffer_flusher_t() {
        flush();
    }
} buffer_flusher;

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
    if (buf_pos == buf_len) {
        buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
        if (buf_pos == buf_len)
            return 1;
    }
    return 0;
}

inline int getChar() {
    return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
    return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
    int c;
    while ((c = peekChar()) != -1 && c <= 32)
        buf_pos++;
    return c == -1;
}

inline void skipBlanks() {
    while (!isEof() && buf[buf_pos] <= 32U)
        buf_pos++;
}

inline int readChar() {
    int c = getChar();
    while (c != -1 && c <= 32)
        c = getChar();
    return c;
}

inline int readUInt() {
    int c = readChar(), x = 0;
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return x;
}

template <class T>
inline T readInt() {
    int s = 1, c = readChar();
    T x = 0;
    if (c == '-')
        s = -1, c = getChar();
    else if (c == '+')
        c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return s == 1 ? x : -x;
}

inline double readDouble() {
    int s = 1, c = readChar();
    double x = 0;
    if (c == '-')
        s = -1, c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    if (c == '.') {
        c = getChar();
        double coef = 1;
        while ('0' <= c && c <= '9')
            x += (c - '0') * (coef *= 1e-1), c = getChar();
    }
    return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
    int c = readChar();
    while (c > 32)
        *s++ = c, c = getChar();
    *s = 0;
}

inline bool readLine( char *s ) {
    int c = getChar();
    while (c != '\n' && c != -1)
        *s++ = c, c = getChar();
    *s = 0;
    return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
    if (write_buf_pos == buf_size)
        fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
    write_buf[write_buf_pos++] = x;
}

inline void flush() {
    if (write_buf_pos)
        fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
}

template <class T>
inline void writeInt( T x, char end, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;

    char s[24];
    int n = 0;
    while (x || !n)
        s[n++] = '0' + x % 10, x /= 10;
    while (n < output_len)
        s[n++] = '0';
    while (n--)
        writeChar(s[n]);
    if (end)
        writeChar(end);
}

inline void writeWord( const char *s ) {
    while (*s)
        writeChar(*s++);
}

inline void writeDouble( double x, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;
    int t = (int)x;
    writeInt(t), x -= t;
    writeChar('.');
    for (int i = output_len - 1; i > 0; i--) {
        x *= 10;
        t = std::min(9, (int)x);
        writeChar('0' + t), x -= t;
    }
    x *= 10;
    t = std::min(9, (int)(x + 0.5));
    writeChar('0' + t);
}

matrix g;
vb used;
vi cnt, c;
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    n = readInt();
    m = readInt();
    k = readInt();
//    cerr << m;
    cnt.resize(k + 1);
//    readChar();
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        c[i] = readInt();
//        cerr << c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        u = readInt();
//        readChar();
        v = readInt();
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            cnt.assign(k + 1, 0);
            sum = 0;
            mx = -INF;
            dfs(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
//#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

template <class T = int> inline T readInt();
inline double readDouble();
inline int readUInt();
inline int readChar(); // first non-blank character
inline void readWord( char *s );
inline bool readLine( char *s ); // do not save '\n'
inline bool isEof();
inline int getChar();
inline int peekChar();
inline bool seekEof();
inline void skipBlanks();

template <class T> inline void writeInt( T x, char end = 0, int len = -1 );
inline void writeChar( int x );
inline void writeWord( const char *s );
inline void writeDouble( double x, int len = 0 );
inline void flush();

static struct buffer_flusher_t {
    ~buffer_flusher_t() {
        flush();
    }
} buffer_flusher;

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
    if (buf_pos == buf_len) {
        buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
        if (buf_pos == buf_len)
            return 1;
    }
    return 0;
}

inline int getChar() {
    return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
    return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
    int c;
    while ((c = peekChar()) != -1 && c <= 32)
        buf_pos++;
    return c == -1;
}

inline void skipBlanks() {
    while (!isEof() && buf[buf_pos] <= 32U)
        buf_pos++;
}

inline int readChar() {
    int c = getChar();
    while (c != -1 && c <= 32)
        c = getChar();
    return c;
}

inline int readUInt() {
    int c = readChar(), x = 0;
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return x;
}

template <class T>
inline T readInt() {
    int s = 1, c = readChar();
    T x = 0;
    if (c == '-')
        s = -1, c = getChar();
    else if (c == '+')
        c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return s == 1 ? x : -x;
}

inline double readDouble() {
    int s = 1, c = readChar();
    double x = 0;
    if (c == '-')
        s = -1, c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    if (c == '.') {
        c = getChar();
        double coef = 1;
        while ('0' <= c && c <= '9')
            x += (c - '0') * (coef *= 1e-1), c = getChar();
    }
    return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
    int c = readChar();
    while (c > 32)
        *s++ = c, c = getChar();
    *s = 0;
}

inline bool readLine( char *s ) {
    int c = getChar();
    while (c != '\n' && c != -1)
        *s++ = c, c = getChar();
    *s = 0;
    return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
    if (write_buf_pos == buf_size)
        fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
    write_buf[write_buf_pos++] = x;
}

inline void flush() {
    if (write_buf_pos)
        fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
}

template <class T>
inline void writeInt( T x, char end, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;

    char s[24];
    int n = 0;
    while (x || !n)
        s[n++] = '0' + x % 10, x /= 10;
    while (n < output_len)
        s[n++] = '0';
    while (n--)
        writeChar(s[n]);
    if (end)
        writeChar(end);
}

inline void writeWord( const char *s ) {
    while (*s)
        writeChar(*s++);
}

inline void writeDouble( double x, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;
    int t = (int)x;
    writeInt(t), x -= t;
    writeChar('.');
    for (int i = output_len - 1; i > 0; i--) {
        x *= 10;
        t = std::min(9, (int)x);
        writeChar('0' + t), x -= t;
    }
    x *= 10;
    t = std::min(9, (int)(x + 0.5));
    writeChar('0' + t);
}

matrix g;
vb used;
vi cnt, c, last;
int mx = -INF, ans = 0, sum = 0;

void dfs(int u, int i) {
    used[u] = 1;
    if(last[c[u]] != i) cnt[c[u]] = 0;
    cnt[c[u]]++;
    last[c[u]] = i;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v, i);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    n = readInt();
    m = readInt();
    k = readInt();
//    cerr << m;
    cnt.resize(k + 1);
//    readChar();
    g.resize(n);
    used.resize(n);
    last.resize(k + 1);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        c[i] = readInt();
//        cerr << c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        u = readInt();
//        readChar();
        v = readInt();
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            cnt.assign(k + 1, 0);
            sum = 0;
            mx = -INF;
            dfs(i, i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


/*
         --┬--  |     |  --┬--                |       |
           |    |\    |    |                  |       |
           |    | \   |    |     ----->       |       |
           |    |  \  |    |                  |       |
           |    |   \ |    |                  |       |
         --┴--  |    \|    |                  └----   └----

*/

#define pragma

#ifdef pragma
#pragma GCC optimize("Ofast")
#pragma GCC optimize("no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC diagnostic ignored "-Wunused-result"
#endif // pragma

#include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ll long long
#define all(x) begin(x), end(x)
#define pb push_back
#define x first
#define y second
//#define int long long
#define zero(x) memset(x, 0, sizeof(x))

using namespace std;
using namespace __gnu_pbds;

typedef vector<int> vi;
typedef vector<bool> vb;
typedef pair<int, int> pii;
typedef long double ld;
typedef vector<vi> matrix;
typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;

const int INF = 1e9 + 7;
const int MAXN = 1e6 + 7;
const ld EPS = 1e-6;
const ld PI = atan2(0, -1);

void seriy() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//     cout << fixed << setprecision(15);
    #if _android
        freopen("input", "r", stdin);
        freopen("output", "w", stdout);
    #endif
}

template <class T = int> inline T readInt();
inline double readDouble();
inline int readUInt();
inline int readChar(); // first non-blank character
inline void readWord( char *s );
inline bool readLine( char *s ); // do not save '\n'
inline bool isEof();
inline int getChar();
inline int peekChar();
inline bool seekEof();
inline void skipBlanks();

template <class T> inline void writeInt( T x, char end = 0, int len = -1 );
inline void writeChar( int x );
inline void writeWord( const char *s );
inline void writeDouble( double x, int len = 0 );
inline void flush();

static struct buffer_flusher_t {
    ~buffer_flusher_t() {
        flush();
    }
} buffer_flusher;

/** Read */

static const int buf_size = 4096;

static unsigned char buf[buf_size];
static int buf_len = 0, buf_pos = 0;

inline bool isEof() {
    if (buf_pos == buf_len) {
        buf_pos = 0, buf_len = fread(buf, 1, buf_size, stdin);
        if (buf_pos == buf_len)
            return 1;
    }
    return 0;
}

inline int getChar() {
    return isEof() ? -1 : buf[buf_pos++];
}

inline int peekChar() {
    return isEof() ? -1 : buf[buf_pos];
}

inline bool seekEof() {
    int c;
    while ((c = peekChar()) != -1 && c <= 32)
        buf_pos++;
    return c == -1;
}

inline void skipBlanks() {
    while (!isEof() && buf[buf_pos] <= 32U)
        buf_pos++;
}

inline int readChar() {
    int c = getChar();
    while (c != -1 && c <= 32)
        c = getChar();
    return c;
}

inline int readUInt() {
    int c = readChar(), x = 0;
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return x;
}

template <class T>
inline T readInt() {
    int s = 1, c = readChar();
    T x = 0;
    if (c == '-')
        s = -1, c = getChar();
    else if (c == '+')
        c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    return s == 1 ? x : -x;
}

inline double readDouble() {
    int s = 1, c = readChar();
    double x = 0;
    if (c == '-')
        s = -1, c = getChar();
    while ('0' <= c && c <= '9')
        x = x * 10 + c - '0', c = getChar();
    if (c == '.') {
        c = getChar();
        double coef = 1;
        while ('0' <= c && c <= '9')
            x += (c - '0') * (coef *= 1e-1), c = getChar();
    }
    return s == 1 ? x : -x;
}

inline void readWord( char *s ) {
    int c = readChar();
    while (c > 32)
        *s++ = c, c = getChar();
    *s = 0;
}

inline bool readLine( char *s ) {
    int c = getChar();
    while (c != '\n' && c != -1)
        *s++ = c, c = getChar();
    *s = 0;
    return c != -1;
}

/** Write */

static int write_buf_pos = 0;
static char write_buf[buf_size];

inline void writeChar( int x ) {
    if (write_buf_pos == buf_size)
        fwrite(write_buf, 1, buf_size, stdout), write_buf_pos = 0;
    write_buf[write_buf_pos++] = x;
}

inline void flush() {
    if (write_buf_pos)
        fwrite(write_buf, 1, write_buf_pos, stdout), write_buf_pos = 0;
}

template <class T>
inline void writeInt( T x, char end, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;

    char s[24];
    int n = 0;
    while (x || !n)
        s[n++] = '0' + x % 10, x /= 10;
    while (n < output_len)
        s[n++] = '0';
    while (n--)
        writeChar(s[n]);
    if (end)
        writeChar(end);
}

inline void writeWord( const char *s ) {
    while (*s)
        writeChar(*s++);
}

inline void writeDouble( double x, int output_len ) {
    if (x < 0)
        writeChar('-'), x = -x;
    int t = (int)x;
    writeInt(t), x -= t;
    writeChar('.');
    for (int i = output_len - 1; i > 0; i--) {
        x *= 10;
        t = std::min(9, (int)x);
        writeChar('0' + t), x -= t;
    }
    x *= 10;
    t = std::min(9, (int)(x + 0.5));
    writeChar('0' + t);
}

matrix g;
vb used;
int cnt[200001];
vi c;
int mx = -INF, ans = 0, sum = 0;

void dfs(int u) {
    used[u] = 1;
    cnt[c[u]]++;
    mx = max(mx, cnt[c[u]]);
    sum++;
    for(auto v : g[u]) {
        if(!used[v]) {
            dfs(v);
        }
    }
}

signed main() {
    seriy();
    int n, m, k;
    n = readInt();
    m = readInt();
    k = readInt();
//    cerr << m;
//    cnt.resize(k + 1);
//    readChar();
    g.resize(n);
    used.resize(n);
    c.resize(n);
    for(int i = 0; i < n; i++) {
        c[i] = readInt();
//        cerr << c[i];
    }
    int st;
    for(int i = 0; i < m; i++) {
        int u, v;
        u = readInt();
//        readChar();
        v = readInt();
        u--;
        v--;
        st = u;
        g[u].pb(v);
        g[v].pb(u);
    }
    for(int i = 0; i < n; i++) {
        if(!used[i]) {
            zero(cnt);
            sum = 0;
            mx = -INF;
            dfs(i);
            ans += sum - mx;
        }
    }
    cout << ans;
    return 0;
}


#include <iostream>
#include <stdlib.h>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <numeric>
#include <cstring>
#include <cstdio>
#include <numeric>
#include <vector>
#include <iterator>
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <iomanip>
#include <cmath>
#include <stack>
#include <cctype>
#include <bitset>
// #include <bits/stdc++.h>
#define int long long int
#define ibs ios_base::sync_with_stdio(false)
#define cti cin.tie(0)
#define bp __builtin_popcount
#define pb push_back
using namespace std;//coded by abhijay mitra
const int N=1e6+10;
const int inf = /*0x3f3f3f3f*/1e15;
// const ll M = 998244353 ; // Mulo
const int M = 1e9+7 ; // Mulo
#define F first
#define S second
int parent[N],ind[N],sexy[N];
int find_set(int v) {
    if (v == parent[v])
        return v;
    return parent[v] = find_set(parent[v]);
}
void make_set(int v) {
    parent[v] = v;
    ind[v] = rand();
}
void union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
        if (ind[a] < ind[b])
            swap(a, b);
        parent[b] = a;
    }
}
int n,m,k,l,r,a[N];vector<int>S[N];
void solve(){
  cin>>n>>m>>k;
  for(int i=1;i<=n;i++)cin>>a[i],make_set(i);
  for(int i=1;i<=m;i++){
    cin>>l>>r;
    union_sets(l,r);
  }
  //component size - most common color
  set<int>s;
  for(int i=1;i<=n;i++){
    s.insert(find_set(i));
    S[find_set(i)].pb(i);
  }
  int ans=0;
  for(auto i:s){
    int ma=-1;
    for(auto j:S[i])sexy[j]=0;
    for(auto j:S[i]){
      sexy[a[j]]++;
      ma=max(ma,sexy[a[j]]);
    }
    ans+=S[i].size()-ma;
  }
  cout<<ans;
}
int32_t main()
{
  ibs;cti;
  solve()/*,cout<<"\n"*/;
  int x=0;
  // int t;cin>>t;while(t--){/*x++;cout<<"Case #"<<x<<": ";*/solve();cout<<"\n";}
  return 0;
}


#include<bits/stdc++.h>
#include<cstring>
#include<limits.h>
#include<iostream>
#include<iomanip>

#define ll long long
#define lld long double
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MOD 1000000007

using namespace std;

int n,k,s;

int main(){
    fast;
    cin>>n>>k>>s;
    if((k>s)|| ((n-1)*k < s))
        cout<<-1;
    else{
        int moves = s/(n-1);
        if(s%k==0 && (k*(n-1)!=s))
            moves--;
        s-=(moves*(n-1));
        k-=moves;
        cout<<"YES"<<endl;
        for(int i=0;i<moves;i++){
            if(i&1){
                cout<<1<<" ";
            }
            else{
                cout<<n<<" ";
            }
        }
        if(moves&1){
            moves=k;
            int j=n-2;
            bool got=true;
            while(moves>1){
                cout<<j<<" ";
                if(got){
                    got=false;
                    j++;
                }
                else{
                    got=true;
                    j--;
                }
                moves--;
                s--;
            }
            cout<<j-s+2<<" ";

        }
        else{
            int j=2;
            moves=k;
            bool got=true;
            while(moves>1){
                cout<<j<<" ";
                if(got){
                    got=false;
                    j--;
                }
                else{
                    got=true;
                    j++;
                }
                moves--;
                s--;
            }
            cout<<j+s-1<<" ";

        }

    }

return 0;}


#include<bits/stdc++.h>
#include<cstring>
#include<limits.h>
#include<iostream>
#include<iomanip>

#define ll long long
#define lld long double
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MOD 1000000007

using namespace std;

int n,k,s;
vector<int> v;

int main(){
    fast;
    cin>>n>>k>>s;
    int moves = s/(n-1);
    if((k>s)||((n-1)*k < s)){
        cout<<"NO"<<endl;
        return 0;
    }
    if(s%(n-1)==0)
        moves--;
    k-=moves;
    s-=moves*(n-1);

    cout<<"YES"<<endl;
    for(int i=0;i<moves;i++){
        if(i&1)
            cout<<1<<" ";
        else
            cout<<n<<" ";
    }
    if(moves&1){
        //High
        int j=n;
        bool got=true;
        while(k>1){
            if(got){
                j--;
                cout<<j<<" ";
                got = false;
            }
            else{
                j++;
                cout<<j<<" ";
                got = true;
            }
            k--;
            s--;
        }
        if(got){
            j = j-s;
                cout<<j<<" ";
        }

    }
    else{
        //Low
        int j=1;
        bool got=true;
        while(k>1){
            if(got){
                j++;
                cout<<j<<" ";
                got = false;
            }
            else{
                j--;
                got = true;
                cout<<j<<" ";
            }
            k--;
            s--;
        }
        if(got){
            j = j+s;
                cout<<j<<" ";
        }

    }

return 0;}


#include<bits/stdc++.h>
#include<cstring>
#include<limits.h>
#include<iostream>
#include<iomanip>

#define ll long long
#define lld long double
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MOD 1000000007

using namespace std;

ll n,k,s;
vector<int> v;

int main(){
    fast;
    cin>>n>>k>>s;
    ll moves = 0;

    ll ko=k,so =s;
    while(1){
        if(so-(n-1) < ko){
            break;
        }
        moves++;
        so-=(n-1);
        ko--;
    }

    if((k>s)||((ll)(n-1)*(ll)k < (ll)s)){
        cout<<"NO"<<endl;
        return 0;
    }
    /*if(s%(n-1)==0)
        moves--;*/
    k-=moves;
    s-=moves*(n-1);

    cout<<"YES"<<endl;
    for(ll i=0;i<moves;i++){
        if(i&1)
            cout<<1<<" ";
        else
            cout<<n<<" ";
    }
    if(moves&1){
        //High
        ll j=n;
        bool got=true;
        while(k>1){
            if(got){
                j-=2;
                cout<<j<<" ";
                got = false;
            }
            else{
                j+=2;
                cout<<j<<" ";
                got = true;
            }
            k--;
            s-=2;
        }
        cout<<j-s<<" ";
    }
    else{
        //Low
        ll j=1;
        bool got=true;
        while(k>1){
            if(got){
                j+=2;
                cout<<j<<" ";
                got = false;
            }
            else{
                j-=2;
                got = true;
                cout<<j<<" ";
            }
            k--;
            s-=2;
        }
        cout<<j+s<<" ";

    }

return 0;}


#include<bits/stdc++.h>
#include<cstring>
#include<limits.h>
#include<iostream>
#include<iomanip>

#define ll long long
#define lld long double
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MOD 1000000007

using namespace std;

ll n,k,s;
vector<int> v;

int main(){
    fast;
    cin>>n>>k>>s;
    ll moves = 0;

    ll ko=k,so =s;
    while(1){
        if(so-(n-1) < ko){
            break;
        }
        moves++;
        so-=(n-1);
        ko--;
    }

    if((k>s)||((ll)(n-1)*(ll)k < (ll)s)){
        cout<<"NO"<<endl;
        return 0;
    }
    /*if(s%(n-1)==0)
        moves--;*/
    k-=moves;
    s-=moves*(n-1);

    cout<<"YES"<<endl;
    for(ll i=0;i<moves;i++){
        if(i&1)
            cout<<1<<" ";
        else
            cout<<n<<" ";
    }
    if(moves&1){
        //High
        ll j=n;
        bool got=true;
        while(k>1){
            if(got){
                j--;
                //cout<<j<<" ";
                v.push_back(j);
                got = false;
            }
            else{
                j++;
                //cout<<j<<" ";
                v.push_back(j);
                got = true;
            }
            k--;
            s--;
        }
        //cout<<j-s<<" ";
        v.push_back(j-s);
        int len = v.size();
        if(v[len-1] < 1){
            v[len-1]+=2;
            v[len-3]-=2;
        }
        for(auto i:v)
            cout<<i<<" ";
    }
    else{
        //Low
        ll j=1;
        bool got=true;
        while(k>1){
            if(got){
                j++;
                //cout<<j<<" ";
                v.push_back(j);
                got = false;
            }
            else{
                j--;
                got = true;
                //cout<<j<<" ";
                v.push_back(j);
            }
            k--;
            s--;
        }
        //cout<<j+s<<" ";
        v.push_back(j+s);
        int len = v.size();
        if(v[len-1] > n){
            v[len-1]-=2;
            v[len-3]+=2;
        }
        for(auto i:v)
            cout<<i<<" ";
    }

return 0;}


#include<bits/stdc++.h>
#include<cstring>
#include<limits.h>
#include<iostream>
#include<iomanip>

#define ll long long
#define lld long double
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MOD 1000000007

using namespace std;

int n,k,s;

int main(){
    fast;
    cin>>n>>k>>s;
    if((k>s)|| ((n-1)*k < s))
        cout<<"NO";
    else{
        int moves = s/(n-1);
        if(s%k==0 && (k*(n-1)!=s))
            moves--;
        s-=(moves*(n-1));
        k-=moves;
        cout<<"YES"<<endl;
        for(int i=0;i<moves;i++){
            if(i&1){
                cout<<1<<" ";
            }
            else{
                cout<<n<<" ";
            }
        }
        if(s==0)
            return 0;
        if(moves&1){
            moves=k;
            int j=n-2;
            bool got=true;
            while(moves>1){
                cout<<j<<" ";
                if(got){
                    got=false;
                    j++;
                }
                else{
                    got=true;
                    j--;
                }
                moves--;
                s--;
            }
            cout<<j-s+2<<" ";

        }
        else{
            int j=2;
            moves=k;
            bool got=true;
            while(moves>1){
                cout<<j<<" ";
                if(got){
                    got=false;
                    j--;
                }
                else{
                    got=true;
                    j++;
                }
                moves--;
                s--;
            }
            cout<<j+s-1<<" ";

        }

    }

return 0;}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 500; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n - 1 && k > 0; ++i)
    {
        int f = min(k, (ans[i+1]-ans[i])-1);
        add[i] += f;
        k -= f;
    }

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  cout << ans[i] << ' ';
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

int32_t main()
{
    int n, k, s;
    cin >> n >> k >> s;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, n - 2);
        add[i] += f;
        k -= f;
    }

    cout << "YES\n";

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i != 0)
        {
            cout << ans[i] << ' ';
        }
        if (i + 1 < ans.size())
        {
            for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                cout << j << ' ';
        }
    }

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, abs(ans[i+1]-ans[i])-1);
        add[i] += f;
        k -= f;
    }

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i)  cout << ans[i] << ' ';
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 500; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
        if (k < 0) NO();
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n - 1 && k > 0; ++i)
    {
        int f = min(k, abs(ans[i+1]-ans[i])-1);
        add[i] += f;
        k -= f;
    }

    if (k != 0) NO();

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  cout << ans[i] << ' ';
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i)  cout << ans[i] << ' ';

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && k > 0; ++j, --k)
                {
                    cout << j << ' ';
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && k > 0; --j, --k)
                {
                    cout << j << ' ';
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    int n, k, s;
    cin >> n >> k >> s;

    vector <int> ans;
    ans.push_back(1);

    int maxi = n - 1;

    while (s >= maxi)
    {
        s -= maxi;
        --k;
        ans.push_back((ans.back() == 1) ? n : 1);
        if (k < 0) NO();
    }

    if (s != 0)
    {
        if (k == 0) NO();
        --k;
        ans.push_back((ans.back() == 1) ? (s + 1) : (n - s));
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n - 1 && k > 0; ++i)
    {
        int flag = min(k, abs(ans[i + 1] - ans[i]) - 1);
        k -= flag;
        add[i] = flag;
    }

    if (k != 0) NO();

    cout << "YES\n";

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i) cout << ans[i] << ' ';
        if (i + 1 < ans.size())
        {
            if (ans[i + 1] > ans[i])
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i]; ++j, --add[i])
                    cout << j << ' ';
            else
                for (int j = ans[i] - 1; j > ans[i+1] && add[i]; --j, --add[i])
                    cout << j << ' ';
        }
    }

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 500; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n - 1 && k > 0; ++i)
    {
        int f = min(k, abs(ans[i+1]-ans[i])-1);
        add[i] += f;
        k -= f;
    }

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  cout << ans[i] << ' ';
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() + 1;
    int k = rand() + 1;
    int c = rand() + 1;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 1000000; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //   cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    if (k > s) NO();

    /* if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();*/

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, n - 2);
        add[i] += f;
        k -= f;
    }

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  ++yu;
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                int F = add[i];
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    //  cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
                add[i] = F;
            }
            else
            {
                int F = add[i];
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    //    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
                add[i] = F;
            }

        }

    }

    if (yu == K && S == s)
    {
        cout << "YES\n";
        for (int i = 0; i < ans.size(); ++i)
        {
            if (i != 0)
            {
                cout << ans[i] << ' ';
            }
            if (i + 1 < ans.size())
            {
                if (ans[i] < ans[i + 1])
                {
                    int F = add[i];
                    for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                    {
                        cout << j << ' ';
                    }
                }
                else
                {
                    for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                    {
                        cout << j << ' ';
                    }
                }

            }

        }

    }
    else
    {
        cout << "NO\n";
    }

    //  }

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

  /*  for (int test = 0; test < 500; ++test)
    {
        genTest();

        freopen("output.txt", "w", stdout);*/

        int n, k, s;
        cin >> n >> k >> s;

        int K = k;

//        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

        int maxi = n - 1;

        if (k < (s / maxi) + (s % maxi != 0)) NO();
        if (k > s) NO();

        vector <int> ans;
        ans.push_back(1);

        int x = s;

        while (x >= maxi)
        {
            ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
            x -= maxi;
            --k;
        }

        if (x != 0)
        {
            --k;
            ans.push_back((ans.back() == 1) ? x + 1 : n - x);
        }

        vector <int> add(ans.size());

        for (int i = 0; i < n && k > 0; ++i)
        {
            int f = min(k, n - 2);
            add[i] += f;
            k -= f;
        }

        cout << "YES\n";

        int S = 0;
        int lst = 1;
        int yu = 0;

        for (int i = 0; i < ans.size(); ++i)
        {
            //if (i != 0)
           // {
          //  cout << ans[i] << ' ';
       // }
            if (i)  cout << ans[i] << ' ';
            S += abs(ans[i] - lst);
            lst = ans[i];

            if (i + 1 < ans.size())
            {
                if (ans[i] < ans[i + 1])
                {
                    for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                    {
                        cout << j << ' ';
                        S += abs(j - lst);
                        lst = j;
                        ++yu;
                    }
                }
                else
                {
                    for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                    {
                        cout << j << ' ';
                        S += abs(j - lst);
                        lst = j;
                        ++yu;
                    }
                }

            }

        }

      //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() + 1;
    int k = rand() + 1;
    int c = rand() + 1;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 1000000; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //   cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    /* if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();*/

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, n - 2);
        add[i] += f;
        k -= f;
    }

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  ++yu;
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                int F = add[i];
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    //  cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
                add[i] = F;
            }
            else
            {
                int F = add[i];
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    //    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
                add[i] = F;
            }

        }

    }

    if (yu == K && S == s)
    {
        cout << "YES\n";
        for (int i = 0; i < ans.size(); ++i)
        {
            if (i != 0)
            {
                cout << ans[i] << ' ';
            }
            if (i + 1 < ans.size())
            {
                if (ans[i] < ans[i + 1])
                {
                    int F = add[i];
                    for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                    {
                        cout << j << ' ';
                    }
                }
                else
                {
                    for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                    {
                        cout << j << ' ';
                    }
                }

            }

        }

    }
    else
    {
        cout << "NO\n";
    }

    //  }

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 500; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
        if (k < 0) NO();
    }

    if (x != 0)
    {
        --k;
        if (k < 0) NO();
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n - 1 && k > 0; ++i)
    {
        int f = min(k, abs(ans[i+1]-ans[i])-1);
        add[i] += f;
        k -= f;
    }

    if (k != 0) NO();

    cout << "YES\n";

    int S = 0;
    int lst = 1;
    int yu = 0;

    for (int i = 0; i < ans.size(); ++i)
    {
        //if (i != 0)
        // {
        //  cout << ans[i] << ' ';
        // }
        if (i)  cout << ans[i] << ' ';
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    cout << j << ' ';
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

  /*  for (int test = 0; test < 500; ++test)
    {
        genTest();

        freopen("output.txt", "w", stdout);*/

        int n, k, s;
        cin >> n >> k >> s;

        int K = k;

//        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

        int maxi = n - 1;

        if (k < (s / maxi) + (s % maxi != 0)) NO();
        if (k > s) NO();

        vector <int> ans;
        ans.push_back(1);

        int x = s;

        while (x >= maxi)
        {
            ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
            x -= maxi;
            --k;
        }

        if (x != 0)
        {
            --k;
            ans.push_back((ans.back() == 1) ? x + 1 : n - x);
        }

        vector <int> add(ans.size());

        for (int i = 0; i < n && k > 0; ++i)
        {
            int f = min(k, n - 2);
            add[i] += f;
            k -= f;
        }

        cout << "YES\n";

        int S = 0;
        int lst = 1;
        int yu = 0;

        for (int i = 0; i < ans.size(); ++i)
        {
            //if (i != 0)
           // {
          //  cout << ans[i] << ' ';
       // }
            if (i)  cout << ans[i] << ' ';
            S += abs(ans[i] - lst);
            lst = ans[i];

            if (i + 1 < ans.size())
            {
                if (ans[i] < ans[i + 1])
                {
                    for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                    {
                        cout << j << ' ';
                        S += abs(j - lst);
                        lst = j;
                        ++yu;
                    }
                }
                else
                {
                    for (int j = ans[i] - 1; j > ans[i + 1]; --j)
                    {
                        cout << j << ' ';
                        S += abs(j - lst);
                        lst = j;
                        ++yu;
                    }
                }

            }

        }

      //  assert(yu == K && S == s);

    //}

    return 0;
}


#include <bits/stdc++.h>
#define int long long

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

int32_t main()
{
    int n, k, s;
    cin >> n >> k >> s;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, n - 2);
        add[i] += f;
        k -= f;
    }

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i != 0)
        {
            cout << ans[i] << ' ';
        }
        if (i + 1 < ans.size())
        {
            for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                cout << j << ' ';
        }
    }

    return 0;
}


#include <bits/stdc++.h>
#define int long long
#include <cassert>

using namespace std;

void NO()
{
    cout << "NO";
    exit(0);
}

void genTest()
{
    srand(time(0));
    freopen("file.txt", "w", stdout);
    int n = rand() % 10 + 2;
    int k = rand() % 5 + 1;
    int c = rand() % 10;
    cout << n << ' ' << k << ' ' << c << '\n';
}

int32_t main()
{

    /*  for (int test = 0; test < 500; ++test)
    {
    genTest();

    freopen("output.txt", "w", stdout);*/

    int n, k, s;
    cin >> n >> k >> s;

    int K = k;

    //        cout << n << ' ' << k << ' ' << s << endl << endl << endl;

    int maxi = n - 1;

    if (k < (s / maxi) + (s % maxi != 0)) NO();
    if (k > s) NO();

    vector <int> ans;
    ans.push_back(1);

    int x = s;

    while (x >= maxi)
    {
        ans.push_back((ans.size() == 0 || ans.back() == 1) ? n : 1);
        x -= maxi;
        --k;
    }

    if (x != 0)
    {
        --k;
        ans.push_back((ans.back() == 1) ? x + 1 : n - x);
    }

    vector <int> add(ans.size());

    for (int i = 0; i < n && k > 0; ++i)
    {
        int f = min(k, n - 2);
        add[i] += f;
        k -= f;
    }

    int S = 0;
    int lst = 1;
    int yu = 0;

    vector <int> newAns;

    for (int i = 0; i < ans.size(); ++i)
    {
        if (i)  newAns.push_back(ans[i]), ++yu;
        S += abs(ans[i] - lst);
        lst = ans[i];

        if (i + 1 < ans.size())
        {
            if (ans[i] < ans[i + 1])
            {
                for (int j = ans[i] + 1; j < ans[i + 1] && add[i] > 0; ++j, --add[i])
                {
                    newAns.push_back(j);
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }
            else
            {
                for (int j = ans[i] - 1; j > ans[i + 1] && add[i] > 0; --j, --add[i])
                {
                    newAns.push_back(j);
                    S += abs(j - lst);
                    lst = j;
                    ++yu;
                }
            }

        }

    }

    if (yu == K && S == s)
    {
        cout << "YES\n";
        for (auto i : newAns)
        {
            cout << i << ' ';
        }
    }
    else
    {
        cout << "NO\n";
    }

    //}

    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s || s>=500000000000000) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  // if(s<n){
  //   ll i=2;
  //   while(k>1) k--,cout<<i++<<' ';
  //   cout<<s+1<<endl;
  //   return 0;
  // }
  REP(i,k+1){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    r--;
    ll last=x-r;
    debug(last);
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    if(!SZ(v) || v.back()==1){
      ll now=1;
      // r--;
      while(r--) now++,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      // r--;
      while(r--) now--,v.pb(now);
      v.pb(now-last);
    }
    break;
  }
  debug(SZ(v));
  assert(SZ(v)==k);
  for( ll i:v ) cout<<i<<' ';
  cout<<endl;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s || s>=500000000000000) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  // if(s<n){
  //   ll i=2;
  //   while(k>1) k--,cout<<i++<<' ';
  //   cout<<s+1<<endl;
  //   return 0;
  // }
  REP(i,k+1){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    ll st=ll(floor((lf)x/(lf)r));
    debug(st,x,r);
    // cnt--;
    ll last=x-(r-1)*st;
    debug(last);
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    if(!SZ(v) || v.back()==1){
      ll now=1;
      r--;
      while(r--) now+=st,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      r--;
      while(r--) now-=st,v.pb(now);
      v.pb(now-last);
    }
    break;
  }
  debug(SZ(v));
  // assert(SZ(v)==k);
  for( ll i:v ) cout<<i<<' ';
  cout<<endl;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  // if(s<n){
  //   ll i=2;
  //   while(k>1) k--,cout<<i++<<' ';
  //   cout<<s+1<<endl;
  //   return 0;
  // }
  REP(i,k){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    ll st=ll(ceil((lf)x/(lf)r));
    debug(st,x,r);
    ll t=0;
    ll cnt=0;
    while(t+st<x) t+=st,cnt++;
    ll last=x-t;
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    debug("hi",cnt);
    if(!SZ(v) || v.back()==1){
      ll now=1;
      while(cnt--) now+=st,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      while(cnt--) now-=st,v.pb(now);
      v.pb(now-last);
    }
    debug("hi",cnt);
    break;
  }
  for( ll i:v ) cout<<i<<' ';
  cout<<endl;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s || s>=500000000000000) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  // if(s<n){
  //   ll i=2;
  //   while(k>1) k--,cout<<i++<<' ';
  //   cout<<s+1<<endl;
  //   return 0;
  // }
  REP(i,k+1){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    ll st=ll(ceil((lf)x/(lf)r));
    debug(st,x,r);
    // cnt--;
    r--;
    ll last=x-r*st;
    debug(last);
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    if(!SZ(v) || v.back()==1){
      ll now=1;
      // r--;
      while(r--) now+=st,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      // r--;
      while(r--) now-=st,v.pb(now);
      v.pb(now-last);
    }
    break;
  }
  debug(SZ(v));
  assert(SZ(v)==k);
  for( ll i:v ) cout<<i<<' ';
  cout<<endl;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  if(s<n){
    ll i=2;
    while(k>1) k--,cout<<i++<<' ';
    cout<<s+1<<endl;
    return 0;
  }
  REP1(i,k){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    ll st=ll(ceil((lf)x/(lf)r));
    debug(st,x,r);
    ll t=0;
    ll cnt=0;
    while(t+st<x) t+=st,cnt++;
    ll last=x-t;
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    if(v.back()==1){
      ll now=1;
      while(cnt--) now+=st,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      while(cnt--) now-=st,v.pb(now);
      v.pb(now-last);
    }
    break;
  }
  for( ll i:v) cout<<i<<' ';
  cout<<endl;
}


#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define X first
#define Y second
#define mkp make_pair
#define pb push_back
#define pob pop_back
#ifdef cold66
#define debug(...) do{\
    fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
    _do(__VA_ARGS__);\
}while(0)
template<typename T>void _do(T &&_x){cerr<<_x<<endl;}
template<typename T,typename ...S> void _do(T &&_x,S &&..._t){cerr<<_x<<" ,";_do(_t...);}
template<typename _a,typename _b> ostream& operator << (ostream &_s,const pair<_a,_b> &_p){return _s<<"("<<_p.X<<","<<_p.Y<<")";}
template<typename It> ostream& _OUTC(ostream &_s,It _ita,It _itb)
{
    _s<<"{";
    for(It _it=_ita;_it!=_itb;_it++)
    {
        _s<<(_it==_ita?"":",")<<*_it;
    }
    _s<<"}";
    return _s;
}
template<typename _a> ostream &operator << (ostream &_s,vector<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a> ostream &operator << (ostream &_s,set<_a> &_c){return _OUTC(_s,ALL(_c));}
template<typename _a,typename _b> ostream &operator << (ostream &_s,map<_a,_b> &_c){return _OUTC(_s,ALL(_c));}
template<typename _t> void pary(_t _a,_t _b){_OUTC(cerr,_a,_b);cerr<<endl;}
#define IOS()
#else
#define debug(...)
#define pary(...)
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#endif // cold66
//}

const ll MAXn=1e5+5,MAXlg=__lg(MAXn)+2;
const ll MOD=1000000007;
const ll INF=0x3f3f3f3f3f3f3f3f;

vector<ll> v;
int main(){
  IOS();
  ll n,k,s;
  cin>>n>>k>>s;
  if((n-1)*k<s || s>=500000000000000) return cout<<"NO"<<endl,0;
  cout<<"YES"<<endl;
  // if(s<n){
  //   ll i=2;
  //   while(k>1) k--,cout<<i++<<' ';
  //   cout<<s+1<<endl;
  //   return 0;
  // }
  REP(i,k+1){
    ll x=s-(n-1)*i;
    if(x>n-1) continue;
    ll r=k-i;
    ll all=i;
    if(r==0){
      while(all--){
        if( !SZ(v) ) v.pb(n);
        else if(v.back()==1) v.pb(n);
        else v.pb(1);
      }
      break;
    }
    ll st=ll(floor((lf)x/(lf)r));
    debug(st,x,r);
    ll t=0;
    ll cnt=0;
    while(t+st<x) t+=st,cnt++;
    // cnt--;
    ll last=x-t;
    while(all--){
      if( !SZ(v) ) v.pb(n);
      else if(v.back()==1) v.pb(n);
      else v.pb(1);
    }
    debug("hi",cnt);
    if(!SZ(v) || v.back()==1){
      ll now=1;
      while(cnt--) now+=st,v.pb(now);
      v.pb(now+last);
    }
    else{
      ll now=n;
      while(cnt--) now-=st,v.pb(now);
      v.pb(now-last);
    }
    debug("hi",cnt);
    break;
  }
  assert(SZ(v)==k);
  for( ll i:v ) cout<<i<<' ';
  cout<<endl;
}