Worked in 2 states last year

i am a resident or virginia but lived and worked in Alaska from april until the end of september which would i file under