SalesforceのApexで参照項目のオブジェクト内の項目の値を更新する

List<Account> accountRecs = new List<Account>();
List<Contract>ContractRecs = [SELECT Id,Name,Account,Account__r.Rent__c FROM Contract limit 1];
for (Contract contractRec : ContractRecs) {
    Account accountRec = new Account(Id= contractRec.Account);
    accountRec.Rent__c = 33000;
    accountRecs.add(accountRec);
}

update accountRecs;