$D^{n}$ with all but one edge identified with a point is homeomorphic to $D^{n}$. Let us denote $D=[0,1]^{n}$ and let $A=\bigg\{(x_{1},...,x_{n})\in D^{n}\,,\exists i\,,s.t\,,1<i\leq n\, ,x_{i}\in\{0,1\}\bigg\}\cup\bigg\{\{1\}\times[0,1]^{n-1}\bigg\}$. Then I want to prove that $D/\sim$ with $A$ identified to a point is homeomorphic to $D$ .
I am having trouble as to produce an explicit homeomorphism(or even a continuous surjection from $D^{n}$ to itself which identifies $A$ with a point and makes $\{0\}\times[0,1]^{n-1}$ the boundary of $D^{n}$ .
In terms of CW complexes , I can say that the space consists of a single $0$-cell with the $n-1$-cell $D^{n-1}$ attached to it by the constant map(So that it is homeomorphic to $S^{n-1}$) . And then we attach the $n$-cell $D^{n}$  with the boundary $S^{n-1}$ being attached to $S^{n-1}$ of the $n-1$ skeleton by the identity map. So it is homeomorphic to $D^{n}\cong D$ .
I tried to do it for the $n=2$ case by mapping $\{0\}\times[0,1]$ to the boundary of $S^{1}$ by $(0,x)\mapsto e^{2i\pi x}$  and $\bigg\{\{1\}\times[0,1]\bigg\}\cup\bigg\{[0,1]\times\{0\}\bigg\}\cup\bigg\{[0,1]\times\{1\}\bigg\}$ to the point $(1,0)$ . Now this map $p:\partial(D)\to D^{2}$ is such that $p_{*}$ is the trivial homomorphism so it extends continuously to a map $p:D\to D^{2}$ but how do I tell if it is surjective or anything else?
I have also considered by transforming the square to a hemisphere with boundary(lower) such that the boundary represents . (in the case of D^{2}, I want $[-1,1]$ represent the lower boundary which we will identify with the three edges of the square) . After that I want to draw lines from a point say $p=(0,0,...,0,-2)$ to the (upper) boundary and extend this line to meet $p$ and then use the universal property of the quotient to identify the lower boundary with the point $(0,0,...,0-2)$ to get a bijection which will be a homeomorphism because our space is compact , hausdorff and so is the target.
Here is a picture which will perhaps explain a bit more on what I was trying to do:-

But as I said, even in this case the explicit map is very complicated and does not allow us to readily view continuity or bijectivity. It's all in terms of lines which depend on the end point. I want to see an explicit map which would help me in constructing these in the future. Most books do not provide explicit maps and say in words however for an initial course in topology and algebraic topology, these things help us to see what's happening more explicitly.
Why I need this: I am trying to show that for $n\geq 2$ every cts $f:S^{n}\to X$ extends to a cts map $F:D^{n+1}\to X$ iff $\Pi_{n}(X,x_{0})$ is trivial. Where $X$ is a path connected space.
To prove the converse I will need the above result.
 A: I believe that these figures show a continuous map from $D^2$ to $D^2$ which maps all
border in the "Source" except $(0,1)\times\{0\}$ (largest $\Pi$-shaped line in the "Source" figure) to the single point
$(1/2, 1)$ (blue dot in the "Target" figure), while being a one-to-one homeomorphism in
the rest of $D^2$, where each line in the "Source" figure maps to a line of the same color in the "Target".

A: Let $x \in S^{n-1}$. As you've said, what you want to prove is equivalent to proving that identifying a closed subset, A, of $S^{n-1}$, viewed of the boundary of $D$ leads to a homeomorphism
$$
D / A \sim D.
$$
To avoid messing around with complicated coordinates, we can look locally around the part of the boundary that is being identified, and construct an explicit map there. Then you can construct a homeomorphism by patching together this map with the identity on the rest of the sphere. Locally the boundary looks like
$$
\mathbb R^{n}_+ = \{(x_1, \dots, x_n)\ |\  x_1 \geq 0\}.
$$
and we can assume that $A = \{0\} \times D^{n-1} \subseteq \mathbb R^n_+$ by shrinking $A$, similar to making $A$ a hemisphere but continuing to shrink it into a neighborhood of the south pole, say. Now we're in good shape because the task is to prove that there is a homeomorphism
$$
\varphi : \mathbb R^n_+ \to \mathbb R^n_+/A
$$
and we can write out an explicit map. To do this consider the homotopy
$$
H_t(x_2, \dots x_n) = \begin{cases}
\frac{t}{t + 1}x &\text{If } x \in D^{n-1} \\
\frac{1}{\|x\|}\left(\frac{t}{t+1} + \|x\| - 1\right)x &\text{Otherwise}
\end{cases}
$$
that shrinks $D^{n-1}$ to the identity. Then we let $\varphi : \mathbb R^n_+ \to \mathbb R^n_+ / A$ be such that
$$
\varphi : (x_1, \dots, x_n) \mapsto [(x_1, H_{x_1}(x_2, \dots, x_n))].
$$
This is a homeomorphism since for each $t \neq 0$, $H_t$ is a homeomorphism and $H_t$ varies continuously with $t$, and this has the required properties on the boundary $t = 0$ by construction.
For large $x$, $\varphi(x)\sim x$ and so we can construct a homeomorphism of $D^n$ by picking a neighborhood $U$ of the south pole and a homeomorphism
$$
U \to \mathbb R_n^+.
$$
and then shrink/move $A$ to be such that the image of $A$ under this homeomorphism is as we assumed. Then define the homeomorphism on $U$ to be $\varphi$ and just the identity on the rest of the disk.
