The city just barely managed to survive being turned into a giant toilet this week thanks to some cute flash-flooding, but our sewer systems aren't the only local infrastructure in need of some fixing. Indeed, the MTA will once again work on the subway this weekend, transforming your A train ride into some sort of Kafkaesque nightmare in hopes of preventing, say, track fires, or something.

Here's what's on tap this weekend:

1 trains will not run in either direction between 14 St and South Ferry, starting at 11:30 p.m. Friday and ending at 5 a.m. Monday. Uptown trains will skip 18 St, 23 St, and 28 St during that period, and downtown trains will skip 28 St, 23 St, and 18 St on days and evenings. Van Cortlandt Park-242 St bound 1 trains will make express stops from 96 St to 145 St, starting at 11:45 p.m. Friday and ending at 5 a.m. Monday.

2 trains will make local stops between Chambers St and 34 St-Penn Station from 11:30 p.m. Friday to 5 a.m. Monday. 2 trains will not run between E 180 St and 3 Av-149 St in either direction, starting at 3:30 a.m. Saturday and ending at 10 p.m. Sunday. Flatbush Av-Brooklyn College bound 2 trains will make express stops from Atlantic Av-Barclays Ctr to Franklin Av from 11:45 p.m. Friday to 5 a.m. Monday.

3 trains will make express stops from Atlantic Av-Barclays Ctr to Franklin Av from 6:30 a.m. to midnight on Saturday and Sunday. 3 trains will run local between Chambers St and 34 St-Penn Station during that time.

Crown Hts-Utica Av bound 4 trains will make express stops between 125 St and Grand Central-42 St from 11:45 p.m. Friday to 7:30 a.m. Sunday, and again from 11:45 p.m. Sunday to 5 a.m. Monday. Woodlawn-bound trains will run express from Brooklyn Bridge-City Hall to 14 St-Union Sq during that period, and New Lots Av-bound trains will run express from Atlantic Av-Barclays Ctr to Franklin Av.

There will be no 5 train service from 11:45 p.m. Friday to 5 a.m. Monday.

Brooklyn Bridge-City Hall bound 6 trains will make express stops between 125 St and Grand Central-42 St, starting at 11:45 p.m. Friday and ending at 5 a.m.on Monday. Pelham Bay Park bound 6 trains will run express from Brooklyn Bridge-City Hall to 14 St-Union Sq during that period.

Inwood-207 St-bound A trains will reroute along the F line from Jay St-MetroTech to W 4 St-Wash Sq before running local to 59 St-Columbus Circle from 11:45 p.m. Friday to 5 a.m. Monday. All A trains are suspended between Ozone Park-Lefferts Blvd and Roackaway Blvd during that period, and Brooklyn-bound A trains will skip 88 St. Brooklyn-bound A trains will skip 50 St, 23 St, and Spring St from 11:45 p.m. Friday to 6:30 a.m. Sunday, and again from 11:45 p.m. Sunday to 5 a.m. Monday; Inwood-207 St bound A trains will run express from 59 St-Columbus Circle to 125 St during that time.

168 St-bound C trains will reroute along the F line from Jay St-MetroTech to W 4 St-Wash Sq from 6:30 a.m. to 11 p.m. Saturday and Sunday They will also run express from 59 St-Columbus Circle to 125 St. Brooklyn-bound C trains will skip 50 St, 23 St, and Spring St during that period.

Coney Island-Stillwell Av bound D trains will make local stops from 145 St to 59 St-Columbus Circle from 12:01 a.m. Saturday to 5 a.m. Monday.

Jamaica Center-Parsons/Archer bound E trains will run express from Queens Plaza to Forest Hills-71 Av from 12:15 a.m. to 6:30 a.m. Saturday and Sunday, and again from 12:15 a.m. to 5 a.m. on Monday. Trains on that track will skip 75 Av and Briarwood from 12:15 a.m. Saturday to 5 a.m. Monday, and WTC-bound E trains will run local from Forest Hills-71 Av to Roosevelt Av during that period.

Jamaica-179 St bound F trains will skip 75 Av, Briarwood, and Sutphin Blvd from 12:15 a.m. Saturday to 5 a.m. Monday. Coney Island-Stillwell Av bound F trains will make local stops from Forest Hills-71 Av to Roosevelt ave from 12:30 a.m. Saturday to 5 a.m. Monday. From 11:45 p.m. Friday to 5 a.m. Monday, Coney Island-Stillwell Av bound F trains will reroute along the E line from Roosevelt Av to W4 St-Wash Sq, and then along the A line to Jay St-MetroTech.

L trains will operate in two sections, between 8 Av and Broadway Junction and between Broadway Junction and Rockaway Pkwy every 24 minutes, starting at 7 a.m. and ending at 7 p.m. on Saturday and Sunday.

N trains will reroute along the D line in both directions from Coney Island-Stillwell Av and 36 St, starting at 11:30 p.m. and ending at 5 a.m. Monday. Downtown N trains will skip 49 St from 11:45 p.m. Friday to 5 a.m. Monday.

Brooklyn-bound Q trains will skip 49 St from 11:45 p.m. Friday to 6:30 a.m. Sunday, and again from 11:45 p.m. Sunday to 5 a.m. Monday. Manhattan-bound Q trains will make express stops from Kings Hwy to Prospect park from 11:15 p.m. Friday to 5 a.m. Monday.

Forest Hills-71 Av bound R trains will make express stops in Queens from 6:30 a.m. to midnight on Saturday and Sunday. Brooklyn-bound R trains will skip 49 St from 6:30 a.m. to 11:30 p.m. on Saturday and Sunday.