# How to make two authors use the same affiliation

I am using ACM 2017 conference template. I have the first author have two affiliations, one of them is shared with the third author. I am running short of space and want to reduce space. I want to use a format that allows me add superscript to the authors names, and write each institution once. I want it to look similar to this picture (see the last author where it has two affiliations one of them is shared with another author, so I want to write the shared affiliation once).

My ACM template looks like this:

where I do not like the repeated affiliations in the first and third author. Can you help me modify it to make it look like the picture above?

Sample latex code:

\documentclass[sigconf]{acmart}
\usepackage{booktabs}
\usepackage{array, makecell}

\author{First Author}
\affiliation{%
\institution{First Instit.}
\city{First City}
\state{First Country}
}

\affiliation{%
\institution{Second Instit.}
\city{Second City}
\state{Second Country}
}
\email{first.author@first.instit}

\author{Second Author}
\affiliation{%
\institution{Third Instit.}
\city{Third City}
\state{third Country}
}
\email{second.author@third.instit}

\author{Third Author}
\affiliation{%
\institution{First Instit.}
\city{First City}
\state{First Country}
}
\email{third.author@third.instit}

\begin{document}

\title{Title}

\begin{abstract}
Abstract
\end{abstract}

\maketitle

\section{This is a Section} Some text here.

\end{document}


Use the authblk package, like so:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{authblk}

\title{FamilyGAN: learning to generate images of Quahog, Rhode Island, USA}

\author[1]{Peter Griffin}
\author[1]{Cleveland Brown}
\author[2]{Glenn Quagmire}
\author[1,2,3]{Joe Swanson}

\affil[1]{School of Computing, University of Utah, Salt Lake City, UT, USA \authorcr
\{\tt peter, cleveland, joe\}@utah.edu}
\affil[2]{NVIDIA Research, Santa Clara, CA, USA \authorcr
\{\tt glenn, joe\}@nvidia.com}
\affil[3]{Department of Engineering, Harvey Mudd College, Claremont, CA, USA \authorcr
\tt joe@hmc.edu}

\date{\today}

\begin{document}

\maketitle

\end{document}