I am new to the shell script, please help. thanks in advance!

#!/bin/bash

for f in f1 f2 ===f1 f2 are the folder name
do
cd $f
cd ??? # i need to enter the two layers of sub folder then find the folder named "abcde" ? for instance: /ap/p/abcde/. how can i do this in shell script:
cd .. # how to get out two layers subdirectory? for instance, if i am in directory /ap/p/abcde/ how i can get out the /abcde , and back to where i was, such as the directory $f.
cd ..
done